我有一個javascript程序寫入一個csv文件的值。 我有一個包含逗號的值。 如何做到這一點? 我是javascript新手。 你能幫我嗎?如何將包含逗號的值寫入csv文件?
我試過雙引號
content += record.number +","+ record.category +","+ record.status +","+ record.approval_status +","+ record.requested_by +","+ record.assigned_to +","+record.assign_dept +","+ record.coordinator +","+ record.coord_phone +","+ record.planned_start +","+ record.planned_end +","+record.reason +","+ record.risk_assessment +","+ record.logical_name +","+ "record.assets" +","+ record.request_date +","+ record.subcategory +","+ record.priority_code +","+ record.impact +","+ record.sched_outage_start +","+ record.sched_outage_end + "\n";
record.assets是將內有逗號領域。
感謝, Chithra
只是報價劃定在您的CSV輸出的列。 – user3358344
試試這個http://stackoverflow.com/questions/17836273/export-javascript-data-to-csv-file-without-server-interaction –