aspose cells - How to import a segment of html into Excel -


requirement:

1.i need export table excel file.

2.i render in html page @ first. have button export html.

my opinion:

1.i html page:

document.getelementbyid('content').value = document.getelementbyid('containerid').innerhtml;  form1.submit(); 

2.i server, response.contenttype = "application/vnd.ms-excel;" // need client has installed microsoft excel.

3.i got right excel file "xxxx.xls".

4.but but, when open it, it's alert waring tell me

  "it's not right format of excel, confirm open it?" 

i'm feel sorry see it.

so want import html section excel file, response right excel file user-agent.

i have use aspose.cells library in project, don't know how use finish task, or other solution solve ?

if need parse html tags/portion excel spreadsheet using aspose.cells .net, may use cell.htmlstring attribute set desired html code segment in cell, parsed accordingly in generated excel file. mind you, not html tags supported @ moment.

aspose.cells .net supports convert excel file html file directly, see documents on file formats supported conversion, may reference: http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/opening-files.html http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/saving-files.html

if still have issue/confusion, kindly give details sample code using aspose.cells api, can you.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -