Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 18th, 2005, 10:46 PM
Registered User
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sushant
Default Import numeric value into the excel

Hi ,

I joined this community today and this is my first message.

I have a query regarding import into excel.
I have a DTS through which i am getting data of a table in excel sheet. But excel is treating the numeric values as string/text.
I know that i can change them by copying and pasting the content using Paste special.
But i do not want to change them explicitly.
Is there any way by which i get right data.



Regards,
Sushant Pandey
 
Old October 19th, 2005, 10:46 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Unfortunately, I don't think DTS will allow you to format data for the target application.

You can GET the data FROM Excel and format it that way, or you can use the following code on the range of cells:

Worksheets("Sheet1").Range("A17").NumberFormat = "Number"

You can also ust click the column heading and format the whole column at once.

HTH


mmcdonal
 
Old October 20th, 2005, 04:46 AM
Registered User
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sushant
Default

Actually this DTS is going to be used behind the code and the excel will be generated automatically. And i dont want the user to change the excel. i just want to give them complete and correct data and hence they can use that sheet as per their requirement.

Regards,
Sushant Pandey
 
Old October 20th, 2005, 01:43 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I would pull from Excel rather than push from SQL.

mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
import excel to access Vision G Access 1 October 15th, 2008 02:12 PM
import data from excel darkhalf Access 5 February 14th, 2008 11:48 AM
Import From excel with n sheets dbellavi SQL Server DTS 1 September 11th, 2007 07:51 AM
Creating an Excel File from .NET with numeric fiel neilwillby VB.NET 2 December 12th, 2005 04:19 PM
Excel Data Import bmains ASP.NET 1.x and 2.0 Application Design 4 April 14th, 2004 02:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.