ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   disable formatting (https://www.excelbanter.com/excel-programming/295031-disable-formatting.html)

Eph0nk

disable formatting
 
Hi,

I wrote an excel/html output from a database, but when it gets imported, the
housenumbers that are formatted like "9/13" or "13-17" get formatted as a
date.
Is there a way to turn this of, or to make sure this doesn't happen?

Regards
Tim De Vogel
S-Data NV


K Dales

disable formatting
 
Answer would depend on the exact method you are using to
import it (Text file? External data query via ODBC? VBA
routine?) However, it might just be simpler to set up a
routine to format that column as text after the import -
it will force Excel to read treat your housenumbers as
text.

-----Original Message-----
Hi,

I wrote an excel/html output from a database, but when it

gets imported, the
housenumbers that are formatted like "9/13" or "13-17"

get formatted as a
date.
Is there a way to turn this of, or to make sure this

doesn't happen?

Regards
Tim De Vogel
S-Data NV

.


Eph0nk

disable formatting
 
I don't import it, I export to the html/excel format that microsoft supports
(where each cell in a table of html is viewed as a cell in excel). It has
the extension .XLS and excel opens it just like it would open up a normal
excel file.
Is there a place where you can point me at that has some info on such a
routine?

---
Tim De Vogel
S-Data NV


"K Dales" schreef in bericht
...
Answer would depend on the exact method you are using to
import it (Text file? External data query via ODBC? VBA
routine?) However, it might just be simpler to set up a
routine to format that column as text after the import -
it will force Excel to read treat your housenumbers as
text.

-----Original Message-----
Hi,

I wrote an excel/html output from a database, but when it

gets imported, the
housenumbers that are formatted like "9/13" or "13-17"

get formatted as a
date.
Is there a way to turn this of, or to make sure this

doesn't happen?

Regards
Tim De Vogel
S-Data NV

.



K Dales

disable formatting
 
The VBA code would be:
Sheets(SheetName).Range(RangeName).NumberFormat="@ "

Where SheetName is the name of the worksheet and RangeName
is the name (or address) of the range including your
housenumbers - example:
Sheets("Import").Range("C:C").NumberFormat = "@"
You could set this up as a macro.

-----Original Message-----
I don't import it, I export to the html/excel format that

microsoft supports
(where each cell in a table of html is viewed as a cell

in excel). It has
the extension .XLS and excel opens it just like it would

open up a normal
excel file.
Is there a place where you can point me at that has some

info on such a
routine?

---
Tim De Vogel
S-Data NV


"K Dales" schreef

in bericht
...
Answer would depend on the exact method you are using to
import it (Text file? External data query via ODBC? VBA
routine?) However, it might just be simpler to set up a
routine to format that column as text after the import -
it will force Excel to read treat your housenumbers as
text.

-----Original Message-----
Hi,

I wrote an excel/html output from a database, but when

it
gets imported, the
housenumbers that are formatted like "9/13" or "13-17"

get formatted as a
date.
Is there a way to turn this of, or to make sure this

doesn't happen?

Regards
Tim De Vogel
S-Data NV

.


.



All times are GMT +1. The time now is 08:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com