Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bug? Unwanted date format pasted on two sheets when csv file importedin excel using ADO
Hi,
When I use CopyFromRecordset to fill a named range referring to a different sheet than the active sheet, the date format of the CSV data is copied to both the active sheet and the named range.. to me this appears a bug, but maybe my connection string or extended properties are flawed. The problem is solved 'for now' by selecting the targeted range before opening the recordset.. but this slows down the process. What could I do better, or is it a bug? I'm using excel2003 strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\Download\;Extended Properties=""Text;HDR=YES;FMT=DELIMITED""" ADOrs.Open SQLstr, strConnect, adOpenStatic, adLockOptimistic Thanks in advance, Poniente |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bug? Unwanted date format pasted on two sheets when csv file impor
Why don't you just reformat the dates with code?
Selection.NumberFormat = "m/d/yyyy" -- HTH, Barb Reinhardt "Poniente" wrote: Hi, When I use CopyFromRecordset to fill a named range referring to a different sheet than the active sheet, the date format of the CSV data is copied to both the active sheet and the named range.. to me this appears a bug, but maybe my connection string or extended properties are flawed. The problem is solved 'for now' by selecting the targeted range before opening the recordset.. but this slows down the process. What could I do better, or is it a bug? I'm using excel2003 strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\Download\;Extended Properties=""Text;HDR=YES;FMT=DELIMITED""" ADOrs.Open SQLstr, strConnect, adOpenStatic, adLockOptimistic Thanks in advance, Poniente |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I format AutoCAD drawings that are pasted into Excel 2007? | Excel Discussion (Misc queries) | |||
Date pasted web site causing inconsistent date format | Excel Worksheet Functions | |||
File always opens with Date format set - Excel 2007 | Excel Discussion (Misc queries) | |||
VB: date format in an Excel file | Excel Programming | |||
how to merge a date file into an excel format | Excel Discussion (Misc queries) |