Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 3rd, 2009, 02:48 PM
Authorized User
Points: 73, Level: 1
Points: 73, Level: 1 Points: 73, Level: 1 Points: 73, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2009
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
Default Problems exporting to excel

I have a program that queries a sql data base that outputs to an excel file. The problem is that when I try to do anything to the data in excel. All the items have a space on the end.

If I delete the space on the end of the data it works fine. But as the file grows this will be a pain.

I have tried to cast the data in the sql statement and Cint in the .asp code.
Is this problem in the export and is it fixable?

Thanks in advance.
Davie
  #2 (permalink)  
Old December 4th, 2009, 12:33 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Does your app actually push an Excel file to the file system or are you simply changing the response ContentType to: "application/vnd.ms-excel"?

Have you tried using Trim() to remove whitespace from the cells as you create the file?

hth
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
The Following User Says Thank You to dparsons For This Useful Post:
hddavie (December 7th, 2009)
  #3 (permalink)  
Old December 5th, 2009, 02:30 PM
Authorized User
Points: 73, Level: 1
Points: 73, Level: 1 Points: 73, Level: 1 Points: 73, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2009
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thanks it's fixed!!
  #4 (permalink)  
Old December 7th, 2009, 02:21 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

For the sake of anyone reading this thread in the future, what did the fix end up being.
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
  #5 (permalink)  
Old December 7th, 2009, 03:19 PM
Authorized User
Points: 73, Level: 1
Points: 73, Level: 1 Points: 73, Level: 1 Points: 73, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2009
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Using trim to remove the white space, there was probably a better way to fix it but I was under a deadline and that was the first thing I tried that fixed it.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting to excel michaeltanfeliz Beginning VB 6 2 May 3rd, 2008 05:26 AM
exporting to excel caveatashish Classic ASP Basics 0 November 3rd, 2006 05:08 AM
problems with Exporting and Viewer mobius498 Crystal Reports 0 April 6th, 2005 02:57 AM
Exporting to Excel swhite Access VBA 2 September 18th, 2003 09:42 AM
Exporting to Excel JJ Access 1 June 9th, 2003 11:30 AM



All times are GMT -4. The time now is 11:44 AM.


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