absolutely, and I have been. just waiting for his mailserver to come back up and running before we fire more work at him ;)
Chris >>> [EMAIL PROTECTED] 13/08/2004 1:51:04 p.m. >>> Perhaps you should liase with the developer for the component you are using. -----Original Message----- From: Chris Veale [mailto:[EMAIL PROTECTED] Sent: 13 August 2004 11:49 AM To: [EMAIL PROTECTED] Subject: RE: [DUG]: Speed of excel saving? Well the save functionality is inherant in the component Im using, saving the stringgrid to a file of .xls format. so the code to export the grid is simple... exportfilename := savedialog1.FileName; SMExportToXLS1.FileName := exportfilename; SMExportToXLS1.Execute; but within the component.....thats another story there is too much code to put into an email like this.... it seems like its real spaghetti code, with function calls all over the place...(last count I had accessed functions in 8 separate units) Still I had a bit of a play around (though dont know for sure what I did) and got the save time down to 15 seconds for a 10mb file, and I think thats acceptable. My only gripe now (though you dont really need to know it) is that the conversion from a stringgrid to excel contains NO smart formatting, if I export a date field I get a string of 38731 for example and I have to manually type over it in order to use excel date formatting routines... Oh well....no rest for the wicked ;) Chris >>> [EMAIL PROTECTED] 12/08/2004 5:07:42 p.m. >>> I would say it's more to do with your selected file format. Excel also creates a temporary file and most likely only updates what has changed when a save is done. This is just a guess as I don't know the internals of excel and it's save process. What type of format are you saving you file to? 14 mins does seem like a long time though. Can you show us some of your saving code? If not perhaps some pseudo code of how your doing it. Alternatively, run it through a profiler. AQ Time has a trial download that you could run it against. -----Original Message----- From: Chris Veale [mailto:[EMAIL PROTECTED] Sent: 12 August 2004 3:00 PM To: [EMAIL PROTECTED] Subject: [DUG]: Speed of excel saving? Hi Is anyone aware how excel saves large files so fast? Further to the saga of my application, a file takes me 14 minutes to save (20 columns and 28000 rows in a stringgrid) but the same file takes excel about 15 seconds! Is it because excel has a hugely optomised save routine, or some impressive data storage mechanism where Im treating everything as a string? Chris _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi ______________________________________________________ The contents of this e-mail are privileged and/or confidential to the named recipient and are not to be used by any other person and/or organisation. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail. ______________________________________________________ _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi ______________________________________________________ The contents of this e-mail are privileged and/or confidential to the named recipient and are not to be used by any other person and/or organisation. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail. ______________________________________________________ _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
