Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to format cells of a column as text programmetically
Hi,
I have got an excel with data and need to import the data into a DBF. Therefore I use the ODBC drivers and the DBF gets created. But found the following problem, When data was entered into the excel initallly, the column was not formated text and remains in general format. Thereafter values were entered such as, 123 45.l00 1/2 Before importing using ODBC I format the entire column as Text programmetically. But eventhough the resulting DBF gets 0, as induvidual cells in the excel does not get formatted, even the column is formatted. Noticed that manually if you goto each cell in the excel and just enter, the value gets formatted into Text and thereafter gets imported properly using ODBC. Could someone please advice how to format each cell in the column, to Text programmetically, which converts the data to text. So that data is proper when the DBF is created using ODBC. Note: SaveAs() of Excel2003 works fine. Excel2007 does not have SaveAs() therefore ODBC is used above. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to format cells of a column as text programmetically
Selection.NumberFormat = "@"
"DPM" wrote: Hi, I have got an excel with data and need to import the data into a DBF. Therefore I use the ODBC drivers and the DBF gets created. But found the following problem, When data was entered into the excel initallly, the column was not formated text and remains in general format. Thereafter values were entered such as, 123 45.l00 1/2 Before importing using ODBC I format the entire column as Text programmetically. But eventhough the resulting DBF gets 0, as induvidual cells in the excel does not get formatted, even the column is formatted. Noticed that manually if you goto each cell in the excel and just enter, the value gets formatted into Text and thereafter gets imported properly using ODBC. Could someone please advice how to format each cell in the column, to Text programmetically, which converts the data to text. So that data is proper when the DBF is created using ODBC. Note: SaveAs() of Excel2003 works fine. Excel2007 does not have SaveAs() therefore ODBC is used above. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to format cells of a column as text programmetically
Hi,
Even formatting the column or each cell with .NumberFormat = "@" formats the cell but does not convert the value. Already entered numbers remains as it is, does not get converted to number beginning with a ' or with the mark towards the left top of the cell. Anyother suggestions please "filo666" wrote in message ... Selection.NumberFormat = "@" "DPM" wrote: Hi, I have got an excel with data and need to import the data into a DBF. Therefore I use the ODBC drivers and the DBF gets created. But found the following problem, When data was entered into the excel initallly, the column was not formated text and remains in general format. Thereafter values were entered such as, 123 45.l00 1/2 Before importing using ODBC I format the entire column as Text programmetically. But eventhough the resulting DBF gets 0, as induvidual cells in the excel does not get formatted, even the column is formatted. Noticed that manually if you goto each cell in the excel and just enter, the value gets formatted into Text and thereafter gets imported properly using ODBC. Could someone please advice how to format each cell in the column, to Text programmetically, which converts the data to text. So that data is proper when the DBF is created using ODBC. Note: SaveAs() of Excel2003 works fine. Excel2007 does not have SaveAs() therefore ODBC is used above. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
format cells in one column based on value in another column | New Users to Excel | |||
Display cells(text) in one column based on cells which are present inother column | Excel Discussion (Misc queries) | |||
format column to text | Excel Programming | |||
Column format as Text | Excel Programming | |||
column format as text | Excel Programming |