Spanky
Spanky

Reputation: 709

How do I convert an HTML table to a CSV file using ASP Classic or JQUERY

I'm trying to figure out how to convert the following table to a CSV (Comma Seperated Value)

<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
</table>

I understand that you need to use something like

Response.AddHeader("Content-Disposition", "attachment;filename=myfilename.csv");

But what else do you need to do?

Upvotes: 0

Views: 942

Answers (1)

Adrian Wragg
Adrian Wragg

Reputation: 7401

The header you're after is Content-Type:

  Response.AddHeader("Content-Type", "text/csv");

Upvotes: 2

Related Questions