View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
quartz[_2_] quartz[_2_] is offline
external usenet poster
 
Posts: 441
Default Converting Excel xls to .csv

It looks ugly, but I have a rather large function that you can call that
writes all Excel data into a csv and runs pretty fast. +/- 30,000 records by
21 columns in less than 1 minute. It uses the Open...For Append method.

You call this function and feed it the full path and name of the desired csv
and an array of sheet names. All the sheets must be formatted alike (i.e.
columns in the same order, etc.). Or the sheet array can include only one
sheet.

All data is surrounded by double quotes and separated by commas. The data is
semi-cleaned up on the fly (i.e. existing double quotes are replaced with
single).

If you want this sort of solution, I can post it. Post back if you would
like it.

"James Puglisi" wrote:

I am trying to convert an excel spreadsheet to csv format, but when I do I
lose all the leading zeros. The zeros are important for several reasons one
being the employees Social Security Number. Any ideas?
--
JimmyP