LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Problem in the data of the file in the FTP after the saving of excelsheets

Hi All,

I am facing a strange problem in the save code.

The details are as follows:

Public Function SaveData() As Boolean
For intcount = 1 To intMgrCount + 1
strSheetName = ThisWorkbook.Worksheets("A").Range("P3").Offset
(intcount - 1, 0).Value
Set mwksDataStore = mwbDataStore.Worksheets(strSheetName)
Set rngTgt = mwksDataStore.UsedRange
rngTgt.ClearContents
Set rngTgt = mwksDataStore.Range("A2")
Set rngSrc = ThisWorkbook.Worksheets(strSheetName).UsedRange
Set rngTgt = rngTgt.Resize(rngSrc.Rows.Count,
rngSrc.Columns.Count)
rngTgt.Value = rngSrc.Value
Next intcount

fMsg.msg = "Uploading data. Please wait..."

saveData = saveSPTes()

End Function


//The Problem lies here
Explanation: The application gets the file from the FTP and saves it
in Temp folder and then opens the application using that data.

When I save the application workbook which is ideally the abcd.xls in
the Temp folder using

mwbDataStore.save
mwbDataStore.Close
these two lines of code it saves the abcd.xls in the Temp folder and
then using upload function i zip it back to 8657.zip in the FTP.

I do not know that some of the sheets which it saves say sheet1 in
8657.zip

have data
#### a b c d
09/06/09 e f g h
09/06/09 i j k l

I am not understanding while saving the data it showed 09/06/09 in
case of ####, but when i open the file which it ha put back to server,
the 09/06/09 for first line is changed to #### though i am just using
"mwbDataStore.save" which just saves the workbook as it is.

Why it happens only for the first line and also it says if you put the
cursor on #### that negative dates are not allowed, but ideally before
i save the workbook i saw that the dates were not negative. It is same
as the other rows, Is that some thing to do with the excel properties
what negative as everything is same as other rows.

Private Function saveSPTes() As Boolean
strXLS$ = mwbDataStore.FullName
strZIP$ =8657
mwbDataStore.save
mwbDataStore.Close
Set mwbDataStore = Nothing

With myFtp
.Connect
saveSP = .upload(tempDir() & strZIP$, FTP_DATA_PATH & strZIP$)
End With
End Function



Please help guys.

I am a bit perturbed with this strange behavious of the
mwbDataStore.save

Regards,

Yuvaraj
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem saving a file Kassie Excel Discussion (Misc queries) 3 March 15th 09 06:32 PM
problem saving as txt file shark102 Excel Discussion (Misc queries) 1 September 13th 07 12:35 PM
File saving problem fire_dragon09 Excel Discussion (Misc queries) 3 August 6th 07 08:35 PM
problem saving csv file CoyB Excel Discussion (Misc queries) 2 August 29th 06 04:31 PM
problem when saving CSV file mhe Excel Worksheet Functions 1 April 5th 05 07:45 PM


All times are GMT +1. The time now is 08:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"