Bulk Export Address to excel

Ramakrishnan G asked on August 8, 2019 16:53

Hi, I am creating a new module for bulk export of Address information from COM_Address,CMS_User and COM_Customer table based on site id, can any one suggest me, all I need how to get that api and a sample query string to export this to excel.

Recent Answers

Juraj Ondrus answered on August 9, 2019 05:57

The same question was posted here as well. You can use Kentico API and standard C# and .Net methods.

0 votesVote for this answer Mark as a Correct answer

Ramakrishnan G answered on August 12, 2019 15:28

I used for below code for download the data to excel file from COM_Address, the file is downloading but empty file only not getting the data.

AddressInfo address = AddressInfoProvider.GetAddresses(); if (address != null) { var websitePath = System.Web.HttpContext.Current.Server.MapPath("~/"); var FileName = string.Format("addresses-upload-template.xlsx"); var exportFilePath = FileHelper.GetFullFilePhysicalPath(ImportExportHelper.GetSiteUtilsFolder()) + "Export\" + FileName; WriteFileToResponse(websitePath, FileName, exportFilePath); }

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.