Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
5
Reply
Download Excel file with bold header with array input using
Bindu Kaperla
Dec 14 2017 12:36 AM
223
Reply
Am downloading an excel file by giving array input and with static headers. Here is my code snippet:
function
exporttoexcel(data){
var
tmpArr = [];
var
tmpArr2 = [];
var
csvData = [];
tmpArr2.push(
"SCA Number"
,
"Contract(Project) Name"
);
csvData.push(tmpArr2.join(
'\t'
));
for
(
var
i=0;i<data.length;i++){
tmpArr = [];
tmpArr.push(data[i].Title);
tmpArr.push(data[i].ContractName);
csvData.push(tmpArr.join(
'\t'
));
}
var
output = csvData.join(
'\n'
);
SaveContents(output);}
File download is working fine. My issue is to get the headers in excel file as bold, in the downloaded file. Anyway, I can achieve it by placing the data in HTML tags.But, I have to generate using array input. Can anyone suggest a better solution for this issue???
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
How to add a content editor web part to a specific page.
SharePoint Online - Update custom User Profile Property