Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Having issue exporting my file to csv using the macro. If i do it on excel it works perfectly, if i copy the code, i get an expected statement error and i am unable to process it, is there any known troubles in this domain ?
Here is what i did via the macro :
- create a worksheet getting the objects of my dashbaord,
- create a second worksheet2 where i create lines for my csv file in a single column and i hardcoded the separator for example i have :
text;text;ContentofMyTableCell1;date;text
text;text;ContentofMyTableCell2;date;text
text;text;ContentofMyTable2Cell1;date;text
text;text;ContentofMyTable2Cell2;date;text
when i want to save i tried the
workbook.saveAs (name) ====> that works but produce me a xls
workbook.saveAs(name,xlCSV) ====> Error cannot call a sub in parenthesis
workbook saveAs filename:= name, fileFormat:=xlCSV =====> error expected statement
any ideas ?
Did you define the constant xlCSV in your code? If not try using the value 6 instead.
CSV as file-format had several limitations - one is it supported only one worksheet and this is probably why your error occured.
- Marcus