Re: CSV Export: Force Trailing Comma?
- From: Bob Quintal <rquintal@xxxxxxxxxxxx>
- Date: Sun, 26 Mar 2006 11:57:08 GMT
"PCD" <notmy@xxxxxxxxx> wrote in
news:InlVf.17814$S25.16819@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
Why didn't you advise the OP to write one field at a time to
his CSV file? You thought that was the correct way to export a
couple of hundred thousand records to Excel!!
Look, Pretty Crappy Developer (PCD), I offered a solution that
met all the constraints.It's not the fastest, but it would work.
Code which satisfies customer requirements without errors is
always the correct way.
It's also obvious to me that you lack the knowledge that you can
write field by field to Excel when the transferSpreadsheet
method fails.
Let us see some code for your solution which would properly
execute writing a single recordset to multiple Excel worksheets.
As for your suggestion in this thread, it has a bug.
If the export specification requires a text qualifier
RevisedLastField:[LastFieldname] & ","
returns "PCD messed up," instead of "PCD messed up",
Put your money where your mouth is.
"Bob Quintal" <rquintal@xxxxxxxxxxxx> wrote in message
news:Xns9791B3AF38F2EBQuintal@xxxxxxxxxxxxxxxxx
bonehead <sendmenospam@xxxxxxxx> wrote in
news:e04c95$n74$1@xxxxxxxxxxxxxxx:
Greetings,Access always puts the correct number of commas. If you need
I'm using the DoCmd.TransferText method to export the
results of a MS Access query to a csv file. The csv will
then be used to load an Oracle table.
In other systems such as TOAD for Oracle, it's possible to
force an additional comma delimiter after the last column,
if the column is empty on a particular row. Oracle requires
this additional comma on empty rightmost columns, for
importing purposes.
I am unable to see how to do this in the Visual Basic
TransferText method, or in the MS Access export
specifications.
Can this be done in VB/Access, and how?
an additional comma at the end of every row, add null as the
expression for the calculated rightmost field in the query.
--
Bob Quintal
PA is y I've altered my email address.
--
Bob Quintal
PA is y I've altered my email address.
.
- Follow-Ups:
- Re: CSV Export: Force Trailing Comma?
- From: PCD
- Re: CSV Export: Force Trailing Comma?
- From: Randy Harris
- Re: CSV Export: Force Trailing Comma?
- References:
- CSV Export: Force Trailing Comma?
- From: bonehead
- Re: CSV Export: Force Trailing Comma?
- From: Bob Quintal
- Re: CSV Export: Force Trailing Comma?
- From: PCD
- CSV Export: Force Trailing Comma?
- Prev by Date: Re: Fix Access 2k2 help?
- Next by Date: Re: SharePoint: What Is It?
- Previous by thread: Re: CSV Export: Force Trailing Comma?
- Next by thread: Re: CSV Export: Force Trailing Comma?
- Index(es):
Relevant Pages
|