Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Jim is offline
external usenet poster
 
Posts: 615
Default External Data from SQL Server

I have a worksheet that is importing data from SQL Server. MS Query is
configured to execute a stored procedure.

Sometimes when I refresh the query with new parameters I lose formatting and
formulas. It is as if Excel is inserting extra columns. the cells with the
formulas are moved to the right and lose their reference. In MS Query and
SMSS everything looks fine, but when the data is brought into Excel it goes
bonkers. I should point out that some of the data is fine, then others are
not.

Any suggestions on what to look for?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default External Data from SQL Server

I've done this before and didn't encounter the problem you described. Are
you editing the query or re-importing the entire data set (which is what it
sounds like). I think this will cause everything to shift to the right.
Maybe you have to delete what's on the sheet, and re-import:

Cells.Select
Selection.ClearContents

'The formatting won't be deleted
'Do the MSQuery here...


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Jim" wrote:

I have a worksheet that is importing data from SQL Server. MS Query is
configured to execute a stored procedure.

Sometimes when I refresh the query with new parameters I lose formatting and
formulas. It is as if Excel is inserting extra columns. the cells with the
formulas are moved to the right and lose their reference. In MS Query and
SMSS everything looks fine, but when the data is brought into Excel it goes
bonkers. I should point out that some of the data is fine, then others are
not.

Any suggestions on what to look for?

Thanks

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
External Data Warning Message - I have No External Data in wrkbk Cass_makeitfun[_2_] Excel Discussion (Misc queries) 0 May 12th 10 09:02 PM
Getting External Data based on criteria insde of the external data BigMacExcel Excel Discussion (Misc queries) 0 August 31st 09 06:41 PM
Does a Pivot External Source to SQL Server stay connected? Plateriot Excel Programming 0 May 22nd 08 03:20 AM
External query of SQL server Linn Kubler Excel Programming 0 March 2nd 06 10:54 PM
Excel Query linking to External (outside domain) SQL server Jeanne Conde Excel Programming 0 July 21st 05 08:00 PM


All times are GMT +1. The time now is 06:15 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"