?
Solved

export from ASP to excel

Posted on 2003-03-19
4
Medium Priority
?
286 Views
Last Modified: 2008-02-01
Hi
I could export the data from ASP to excel sheet

but problem is width adjustment.
since each of my field name is quite big i am unable to control width of
my excel sheet.

I tried with <table width = 10%> also but it is not taking.

If we are in excel sheet we have option format --> column --> width
how to adjust this width in excel sheet?
I am exporting data by content type.

thanks

swap
0
Comment
Question by:swapnilv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Accepted Solution

by:
Zelja earned 252 total points
ID: 8165629
Hi,
well I am not sure how far excel files can be manipulated by pure ASP, I usually use VB com objects to manipulate with excel file.
There are 2 possibilities, get some object for example www.softartisans.com - Excel Writer
or code your own..here is a helpfull link from msdn:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrunderstandingexcelapplicationobject.asp

regards.
Zeljko
0
 

Assisted Solution

by:maldo
maldo earned 248 total points
ID: 8166891
Swap,

Are you exporting the data directly from the ASP using the Excel Object Library and SQL/Access or some other database?  If so, try something like this:

Set ExcelApplication = Server.CreateObject( "Excel.Application" )

ExcelApplication.Visible = False

ExcelApplication.Workbooks.Add

Set ExcelWorksheet = ExcelApplication.Worksheets( 1 )

ExcelWorksheet.Range( "A1:F1" ).ColumnWidth = Array( 14.86, 35.71, 33.14, 16.14, 16.14, 16.14 )

The values you set in the array will control the column width for the range you have specified.  Hope this helps.

maldo
0
 
LVL 58

Expert Comment

by:Gary
ID: 9315780
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split Points - maldo / Zelja

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
EE Cleanup Volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question