Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HTML / Excel format problem
I'm not sure if this is the correct group in which to post this, but here goes.
I'm creating a spreadsheet in an ASP page where I include the meta tag so that the browser converted the data into an excel file. The Meta tag is added as follows: Response.AddHeader("Content-Type", "application/x-msexcel") But no matter what I do, if the user tries to sort the data I get this error: This operation requires the merged cells to be identically sized I see that there is a workaround of highlighting the data and unmerging the cells, but I'm not sure that my client is going to go for that solution. However I cannot figure out why it thinks the cells are merged. All cells are individual when I create the page so I'm baffled. Is there anyone who has figured out how to get rid of this problem? Thanks, Velvet |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
HTML / Excel format problem
Hi Velvet,
Thanks for your posting! I did not understand your scenario very much. Firstly I would like to clarify the scenario with you. Do you mean you want to Export an Excel file in an asp page? So that when the End User access to the ASP page with IE, the Excel Application will open to show the Excel file. or Can you describe the scenario more clearly? Best regards, Peter Huang Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
HTML / Excel format problem
Yes. Basically the ASP page find whether the user wants to see the data
from the query in HTML or to be saved as an XLS file. Depending on the form selection I set the meta tag MIME type to HTML or XLS mode. If the user chooses XLS (and I add the MIME type header), then the browser pops up a message asking if they want to open the file or save it. My customer wants to save it and then open it offline. When they open it, after saving to the local hard drive, and he tried to sort the data he get's the afore mentioned error. The workaround to the error is to unmerge the merged cells, but I would rather not have any of them merged in the first place. I'm wondering if this is something I'm doing in my table (in the way of formatting) to make the cells merge or if this is just par for the course when using the MIME type for conversion. I think I'll just have it spit out one row and see if the error still pops. Thanks! Velvet ""Peter Huang" [MSFT]" wrote in message ... Hi Velvet, Thanks for your posting! I did not understand your scenario very much. Firstly I would like to clarify the scenario with you. Do you mean you want to Export an Excel file in an asp page? So that when the End User access to the ASP page with IE, the Excel Application will open to show the Excel file. or Can you describe the scenario more clearly? Best regards, Peter Huang Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
HTML / Excel format problem
Ok, I only spit out about 40 rows and the error didn't happen. So now I'm
convinced it's something in the data. Maybe a double quote messing up the formatting or something... More testing... "Velvet" wrote in message ... Yes. Basically the ASP page find whether the user wants to see the data from the query in HTML or to be saved as an XLS file. Depending on the form selection I set the meta tag MIME type to HTML or XLS mode. If the user chooses XLS (and I add the MIME type header), then the browser pops up a message asking if they want to open the file or save it. My customer wants to save it and then open it offline. When they open it, after saving to the local hard drive, and he tried to sort the data he get's the afore mentioned error. The workaround to the error is to unmerge the merged cells, but I would rather not have any of them merged in the first place. I'm wondering if this is something I'm doing in my table (in the way of formatting) to make the cells merge or if this is just par for the course when using the MIME type for conversion. I think I'll just have it spit out one row and see if the error still pops. Thanks! Velvet ""Peter Huang" [MSFT]" wrote in message ... Hi Velvet, Thanks for your posting! I did not understand your scenario very much. Firstly I would like to clarify the scenario with you. Do you mean you want to Export an Excel file in an asp page? So that when the End User access to the ASP page with IE, the Excel Application will open to show the Excel file. or Can you describe the scenario more clearly? Best regards, Peter Huang Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
HTML / Excel format problem
Found it! It was a <br that the client had added to the field contents in
the database. Thanks! "Velvet" wrote in message ... Ok, I only spit out about 40 rows and the error didn't happen. So now I'm convinced it's something in the data. Maybe a double quote messing up the formatting or something... More testing... "Velvet" wrote in message ... Yes. Basically the ASP page find whether the user wants to see the data from the query in HTML or to be saved as an XLS file. Depending on the form selection I set the meta tag MIME type to HTML or XLS mode. If the user chooses XLS (and I add the MIME type header), then the browser pops up a message asking if they want to open the file or save it. My customer wants to save it and then open it offline. When they open it, after saving to the local hard drive, and he tried to sort the data he get's the afore mentioned error. The workaround to the error is to unmerge the merged cells, but I would rather not have any of them merged in the first place. I'm wondering if this is something I'm doing in my table (in the way of formatting) to make the cells merge or if this is just par for the course when using the MIME type for conversion. I think I'll just have it spit out one row and see if the error still pops. Thanks! Velvet ""Peter Huang" [MSFT]" wrote in message ... Hi Velvet, Thanks for your posting! I did not understand your scenario very much. Firstly I would like to clarify the scenario with you. Do you mean you want to Export an Excel file in an asp page? So that when the End User access to the ASP page with IE, the Excel Application will open to show the Excel file. or Can you describe the scenario more clearly? Best regards, Peter Huang Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
HTML / Excel format problem
Hi Velvet,
Thanks for your quickly reply! I am glad you have found the solution. If you still have any concern, please feel free to post here. Best regards, Peter Huang Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automation problem saving Excel as HTML. | Excel Programming | |||
Problem saving Excel file in HTML format | Excel Programming | |||
how to convert a html page to excel format ? | Excel Discussion (Misc queries) | |||
Use excel in html format change the links | Excel Programming | |||
HTML TAGS that format Data for import into Excel | Excel Programming |