OWC automatic format problem

N

Nicolas Tostin

Hi,
I'm working with an asp clas I've made a while ago, and now i'm having a
little trouble :
I 'm working with OWC9, ASP3
I pass to my class an array with datas, then I made a string with all datas
separated by Tab, then I use the function objSpreadsheet.LoadText to put
every thing in an excel sheet.

This was working perfectly but I encoutered a problem, a few times ago :
If I got a value like 277A when it loads my spreadsheet, the value is
interpreted by Excel and think it's a date. Then I put my own format on this
but it doesnt change nothing.

Have you ever experienced it ?
You can test it with loading a csv file that contain "test,277A,10/10/2003"
and then export it (the only way to get an excel file from OWC9) :
objSpreadsheet.LoadText My_file, ","
objSpreadsheet.ActiveSheet.Export My_file & ".xls", 0

And you will get an excel file with test and then in the second cell :
"11/01/1900 01:00:00 p.m."

Can't believe it...
The worst thing is that I don't know how to deactivate this function or
preload a format, for it doesn't allow OWC to put it's own format....

Tks for your help, I hope I was clear....

Nicolas
 
A

Alvin Bruney

Unfortunately, all the office components suffer this annoying behavior. Try
to disable it by appending a ' or apostrophe before or after the value to
disguize it.

regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top