F
Fred Morrison
I noticed that when I tried to use ADO.Net to read an Excel workbook
(actually a Named Range called Data) that includes headers (thus HDR=Yes), I
notice that a purely numeric value in the first column is treated as a
Double, despite being told (via IMEX=1) to treat all columns as Text.
Is this a bug? Broken As Designed (B.A.D.)? Or am I not interpreting the
meaning of IMEX=1 correctly (W.A.D.)?
My only work-around was to open up the Excel workbook, put an 'X' in front
of the number in the first nine rows, add code to strip it back out
(stringVar.Remove(0,1)), which seemed to fool ADO.Net into treating the
column as pure Text instead of a Double.
A portion of the connect string: Extended Properties="IMEX=1;HDR=Yes;"
(actually a Named Range called Data) that includes headers (thus HDR=Yes), I
notice that a purely numeric value in the first column is treated as a
Double, despite being told (via IMEX=1) to treat all columns as Text.
Is this a bug? Broken As Designed (B.A.D.)? Or am I not interpreting the
meaning of IMEX=1 correctly (W.A.D.)?
My only work-around was to open up the Excel workbook, put an 'X' in front
of the number in the first nine rows, add code to strip it back out
(stringVar.Remove(0,1)), which seemed to fool ADO.Net into treating the
column as pure Text instead of a Double.
A portion of the connect string: Extended Properties="IMEX=1;HDR=Yes;"