Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-27-2014, 01:35 AM
rajemessage rajemessage is offline how to import resultset of sqlserver in .csv formate into xls 2003 Windows 7 32bit how to import resultset of sqlserver in .csv formate into xls 2003 Office 2003
Novice
how to import resultset of sqlserver in .csv formate into xls 2003
 
Join Date: Jan 2014
Posts: 1
rajemessage is on a distinguished road
Default how to import resultset of sqlserver in .csv formate into xls 2003

Dear all,



some times i need to save result set of sql server in .csv format and then need to save in xls format with out loosing any

precision , i have some decimal values and some bigint values,

2003 ms offices gives option to set each columns type while

opening any .csv file , is it the only way i can preserve the type or is there any other easy was because some times number of cols are more.

yours sincerely
Reply With Quote
  #2  
Old 01-29-2014, 03:52 PM
BobBridges's Avatar
BobBridges BobBridges is offline how to import resultset of sqlserver in .csv formate into xls 2003 Windows 7 64bit how to import resultset of sqlserver in .csv formate into xls 2003 Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Raje, are you saying that when you open a .csv file in Excel, you're losing some precision? The VBA language has different data types that require more or less bytes of storage, but I'm not aware that Excel does that; I think every cell's numeric value has the same precision, no matter what of numeric data is in there.

I can imagine writing a VBA program that would a) read a .csv file as text, b) look at each incoming value to see how many digits of precision it has, c) store that value in the correct datatype (eg Integer, Long or LongLong) and finally d) copy the imported value into an Excel worksheet. But as soon as the data is placed in Excel, isn't the result going to be exactly the same?

If you think you're losing precision, please post a copy of an example, a .csv file that can't be read into Excel 2010 without losing digits. I can easily believe that; but I think my response is going to be "but you were losing precision when you read it into Excel 2003 too". Maybe it let you set the data type when you read it in (though I don't remember it), but the internal storage was the same in all cases.

One possibility: Are you sure you're not thinking of text importing? There, yes, you can tell Excel what sort of data you're reading in—text, dates, or "General"—but even there you're not talking about different precisions.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to import letterhead?? kevinbeans Word 12 10-16-2013 10:20 AM
Import from Evernote KathleenC OneNote 0 08-28-2013 10:40 AM
how to import resultset of sqlserver in .csv formate into xls 2003 Export Outlook 2010 .pst to import to 2003 Lensmeister Outlook 1 04-23-2012 03:08 AM
import emails, contacts from Apple Mail to Outlook 2003 hippo430 Outlook 0 02-15-2009 05:53 PM
BCM import Magic2 Outlook 0 12-04-2008 09:49 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:42 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft