Extra rows in csv file
do edit =goto = Special = Last Cell
do you end up well past your data. If so, you need to delete entire rows
below your last filled cell
set rng = cells(rows.count,1).End(xlup)
rows(rng.row+1 & ":65536").Delete
ActiveSheet.UsedRange
' now save the file
This assumes these rows are actually empty.
--
Regards,
Tom Ogilvy
"Kevin" wrote in message
...
When I save a worksheet as a .csv file via macro
(using "ActiveWorkbook.SaveAs FileNameString,
FileFormat:= xlCSV, CreateBackup:=False"), Excel seems to
add a large number of empty rows (all commas, no data) at
the bottom of the rows with data.
Any way to tell it how many rows to save, without the
rows of nulls?
Thanks in advance
kevin
|