R
Richard Marsden
I'm currently working on an application that reads/writes data from/to
Access and Excel. Other databases will probably be added in the future.
This is in C#, so I've been reading up on ADO.NET and using this to do
all the data I/O. So far this has been working well.
I have hit an "inconvenience" for Excel, though. Most of the output
fields are numeric, but the user can select text or number fields. For
the text field I simply convert the number to a string first before
writing it.
That works fine, except Excel is not as strongly typed as the usual
relational databases. Therefore a user might expect a column to be
numeric, but in reality Excel thinks the field is text.
Is there a way to write a number to Excel through ADO.Net that forces
the cell to be a number, and not text?
(I know a priori if the connection is an Excel one or not)
Richard
--
Richard Marsden
Winwaed Software Technology LLC
http://www.winwaed.com
Tools and Add-ins for MapPoint - http://www.mapping-tools.com
Access and Excel. Other databases will probably be added in the future.
This is in C#, so I've been reading up on ADO.NET and using this to do
all the data I/O. So far this has been working well.
I have hit an "inconvenience" for Excel, though. Most of the output
fields are numeric, but the user can select text or number fields. For
the text field I simply convert the number to a string first before
writing it.
That works fine, except Excel is not as strongly typed as the usual
relational databases. Therefore a user might expect a column to be
numeric, but in reality Excel thinks the field is text.
Is there a way to write a number to Excel through ADO.Net that forces
the cell to be a number, and not text?
(I know a priori if the connection is an Excel one or not)
Richard
--
Richard Marsden
Winwaed Software Technology LLC
http://www.winwaed.com
Tools and Add-ins for MapPoint - http://www.mapping-tools.com