Hi All. I am very new to VBA and programming so please make it simple for me.
I want to export a table Headers and Totals row only to CSV.
How can I do this thru VBA?
Thanks,
Hi All. I am very new to VBA and programming so please make it simple for me.
I want to export a table Headers and Totals row only to CSV.
How can I do this thru VBA?
Thanks,
Is the header row the first row?
How do you identify the total row(s)? Is it the last row on the sheet, or are there several total rows?
Post a sample workbook.
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Thank you,
Yes. The table is on separate sheet. The Headers is the first row
and the subtotals are on the last row.
However, There are many workbooks with tables, all having the same sheet name "S" and the same table name "S"
but they vary in row count
(some tables 500 rows and others are 1800 rows so a fixed range is not an option)
I am thinking to export to CVS the headers by
and totals rows byPlease Login or Register to view this content.
But cant figure how. I will try to post a sample file later on.Please Login or Register to view this content.
Mean time, any ideas are appreciated.
Thanks.
Last edited by alansidman; 11-22-2020 at 09:36 AM.
Well, thinking out loud, I’d probably move/copy the whole sheet and then convert the total row to values. Then you can delete the DataBody rows and save just the header and total rows to your csv file.
Untried and untested at the moment, but that's the theory.
This will give you an idea...
Please Login or Register to view this content.
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
Thanks. I am trying a solution will get back later.
Last edited by ZaherHabhab; 11-26-2020 at 02:54 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks