Hi, great forum here. It has helped me out countless times.
I'm exporting a table to csv using the transfertext method.
Then im inserting a custom header and footer using vba writeline and writeline readall for the main csv body.
The problem I have, is when exporting the original csv there is a blank line at the bottom. So when I writeline the footer, it appears after the blank line.
I was wondering if there is a simple way to do this? I can think of messy ways with counts of lines etc, but wondered if there was a function I could use in vba or something in the original export spec I could include.
The file ends up looking something like this:
Header1234
561651,sgdg,541651
561651,sgdg,541651
561651,sgdg,541651
561651,sgdg,541651
footer,4
I'm exporting a table to csv using the transfertext method.
Then im inserting a custom header and footer using vba writeline and writeline readall for the main csv body.
The problem I have, is when exporting the original csv there is a blank line at the bottom. So when I writeline the footer, it appears after the blank line.
I was wondering if there is a simple way to do this? I can think of messy ways with counts of lines etc, but wondered if there was a function I could use in vba or something in the original export spec I could include.
The file ends up looking something like this:
Header1234
561651,sgdg,541651
561651,sgdg,541651
561651,sgdg,541651
561651,sgdg,541651
footer,4