NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: ntnewbies on August 20, 2020, 01:44:57 AM

Title: excel export in browse
Post by: ntnewbies on August 20, 2020, 01:44:57 AM
hi friends,

is there a way to rename the worksheet before export the browse?

i notice there is only ExcelExport.SetWorkSheet and ExcelExport.WithWorkSheet

it would be great if we have excelexport.renameworksheet


also, i would like to put a name at the first row and column and when i put it as
ExcelExport.SetCell(1,1,'Booking Sheet')

i only see the first column and row as 0



jason

Title: Re: excel export in browse
Post by: Bruce on August 24, 2020, 11:19:02 PM
Hi Jason,

In the generated source look for where the name is set;

p_web.HeaderDetails.ContentDisposition = 'attachment; filename="Customer.xml"'

then in the next available embed point simply set this same line to whatever you like. eg
p_web.HeaderDetails.ContentDisposition = 'attachment; filename="Jason.xml"'


>> also, i would like to put a name at the first row and column and when i put it as
>> ExcelExport.SetCell(1,1,'Booking Sheet')

Seems to be working here, so maybe make sure you are calling this _after_ the place where the template generates the headers.

cheers
Bruce

Title: Re: excel export in browse
Post by: ntnewbies on August 25, 2020, 12:02:58 AM
hi bruce
i can rename the file from xml to xls. that is not a problem.

what i mean is renaming the WORKSHEET name inside the excel file.

jason
Title: Re: excel export in browse
Post by: Bruce on September 01, 2020, 11:23:41 PM
>> it would be great if we have excelexport.renameworksheet

Added to xFiles 3.19 (now up)

For NetTalk 12 I've also made the Worksheet name a template setting.

cheers
Bruce
Title: Re: excel export in browse
Post by: ntnewbies on September 02, 2020, 02:29:06 AM
thanks bruce
it works well as expected.

jason