Home > Archive > Visual Basic > April 2006 > Print #1 exporting to Excel
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Print #1 exporting to Excel
|
|
| Lina Manjarres 2006-04-26, 6:56 pm |
| I have a system that sends data to an excel sheet using the print #1 command.
If I send a number of this type: 98501456325896, I will get something like
this in excel: 9.1801E+13. If I go to excel and I change the cell format from
General to Number, it displays the number correctly.
The question is, how can I send this number so Excel displays it correctly
from the beginning?
Thanks a lot, Lina
| |
| Jeff Johnson 2006-04-26, 6:56 pm |
|
"Lina Manjarres" <LinaManjarres@discussions.microsoft.com> wrote in message
news:DF595E2B-8A93-446C-95BA-52C528BF382E@microsoft.com...
>I have a system that sends data to an excel sheet using the print #1
>command.
> If I send a number of this type: 98501456325896, I will get something like
> this in excel: 9.1801E+13. If I go to excel and I change the cell format
> from
> General to Number, it displays the number correctly.
> The question is, how can I send this number so Excel displays it correctly
> from the beginning?
You can't do this with Print #, because you're not creating an Excel
workbook but rather just a text file that Excel can read and which contains
no formatting. You'd have to use Automation to create an instance of Excel
and set properties.
The only other option would be to read up on the XML formats that Microsoft
has developed for saving Office documents and create a file using
SpreadsheetML.
|
|
|
|
|