1

I am using this method to export HTML Tables to Excel. However some of the colums in my data have < characters. This cause an error when I try to open the file in Excel. Is there some way to ignore these characters or automatically replace them? Eg:

<tr>
<td>Assume A>B</td>
</tr>

PS: I already have the html data with < character. I am pulling it into a new page, which has a button to export it to excel (using xml format).

2 Answers 2

1

I am not aware of any solution to the problem mentioned by you. However a workaround can be to write a small data sanitation script using Perl/sed to sanitize your data. The details of such a script might be taken from here.

Sign up to request clarification or add additional context in comments.

1 Comment

Accepting this in absence of a better answer
0

MS-Excel in general has no problem with the '<' character. HTML applications however tend to interprete the '<' character as start of an HTML tag.

You can replace the character by &lt; during the export and import, and replace this back to '<' when in Excel.

Or you can make sure that text fields are quoted during the process.

1 Comment

I already have the html data with < character. I am pulling it into a new page, which has a button to export it to excel (using xml format). Edited the Question to add the same info.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.