Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
mas mas is offline
external usenet poster
 
Posts: 1
Default RowNumber corrupts formatting of Querytable

Hi All !

I have used the Querytable in Excel to display data, I selected from
my Database. The date-fields were formatted as date, the numbers as
numbers. So good so far. Then I decided to use RowNumbers.
After I set RowNumbers=True, the number was displayed as a date and
vice versa.
I found out, that the formatting (date, number) stayed on the column,
where it was before, but the data has moved one column right, because
the RowNumber was inserted in the first column.


Is this a bug in Excel, or did I miss to set a parameter ?


This is my Code:
Table = WSData.QueryTables.Add("ODBC;DSN=" & DSN,
WSData.Range("A1"), SQLText)
XLApp.DisplayAlerts = False
Table.Name = "Abfrage von " + DSN
Table.AdjustColumnWidth = True
Table.BackgroundQuery = True
Table.FieldNames = True
Table.FillAdjacentFormulas = False
Table.PreserveColumnInfo = True
Table.PreserveFormatting = True
Table.RefreshOnFileOpen = False
Table.RefreshPeriod = 0
Table.RefreshStyle = 1
Table.RowNumbers = True
Table.SavePassword = False
Table.SaveData = True
Table.Refresh(True)


Where WSData is my Datasheet and XLApp my Application-Object


Can anyone of you help me ?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
to set rownumber pol Excel Discussion (Misc queries) 3 July 23rd 09 02:50 PM
How to use the rownumber of the current cell in a formula Wim Goelen Excel Worksheet Functions 3 October 28th 08 08:47 PM
Cells( rowNumber, colName ) doesn't work Peter Chatterton Excel Programming 8 September 14th 04 11:14 PM
Reference to DLL corrupts on recompile of dll Robin Hammond[_2_] Excel Programming 2 April 12th 04 08:49 AM
QueryTable Field Name formatting igneramos Excel Programming 0 January 21st 04 04:09 PM


All times are GMT +1. The time now is 07:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"