Extra trailing commas in exported CSV

L

lucidr

Hi All

I have some VBA that exports a sheet from my workbook as a CSV file. I
do some cleaning up on the sheet before it is exported:

wksCSV.Range("H2:AA65536").Clear
wksCSV.Range("A2:AA65536").ClearFormats

Despite this I consistently get two extra trailing commas on rows 2 to
16 (first row is a header, which is longer) in the resulting CSV (as if
H2:I16 contained something). Any suggestions?
 
K

Kaak

You will get as many comma's as columns
The number of columns is set by the header row
 
L

lucidr

This doesn't happen for rows beyond row 16. Does Excel do this in chunks
of 16 rows maybe? Another great bit of 'design'...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top