Finding and replacing text formatting for strings within a cell

W

WhyNot?

I have four high-priority projects to finish in the next four days and
I think I'm too stressed out to find an answer for this sub-problem in
Excel.

I need to export a worksheet that has text formatting withen cells to
CSV. The program that reads in the CSV needs to restore the text
formatting. Here is an example with BOLDing:

1. Find a cell that has characters in BOLD. This may be the first
character in the cell, or a string of characters anywhere in the cell.
2. Save the contents of the cell.
2. Determine the beginning and ending characters of strings in the
cell that have a text format of BOLD.
3. Pre-pend and append <BOLD> and </BOLD> to the string. NOTE: this is
not HTML, I just chose them as a meaningful term.
4. Put everything back into the cell. I don't care if the whole cell
is now bold or not as I'm going to export to a CSV.

The programming importing the data can't read RTF files. And I can't
find a way to get the data into RTF anyway.

I tried using XML output from Excel using an XML Map in the hopes that
I could find a way to keep the formatting using XML tags, but I can't
find a way to keep the formatting. Probably my inexperience in
Schemas, but I don't have time to gain experience before this is all
due.

Help? Please? Anyone?

D
 
W

WhyNot?

I work with a Jeff, but not this one.

Thanks for the reference, I really appreciate it. Between the
projects, my wife's cancer, my bipolar son, the house remodeling, and
unnecessary paperwork I think I'm starting to crack under the strain,
slip, slide, perish. You're very kind to help.

D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top