+ Reply to Thread
Results 1 to 12 of 12

Conversting RTF file into Excel file

  1. #1
    Registered User
    Join Date
    08-31-2012
    Location
    Andromeda, Hawaii
    MS-Off Ver
    Excel 97/2003 and 5.0/97
    Posts
    49

    Conversting RTF file into Excel file

    i tried my best to find a solution in the net in regards with my dilema, this is the transferring or converting of the RTF data into Excel and this includes the Header information.

    Any tip or help I appreciate.

    Thank you.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Conversting RTF file into Excel file

    Can we safely assume that RTF stands for the commonly used Rich Text Format?

    Can you explain in some detail what this conversion process means to you? Rich text format contains the text plus formatting information. I don't think that Excel can "automatically" read and interpret RTF, but the information is all there if you can program Excel to separate the text from the formatting information and capture the desired text + formatting information that you require.

    This Wikipedia page may be useful in understanding what information is stored in RTF https://en.wikipedia.org/wiki/Rich_Text_Format There are also several converters listed. None claims to convert to Excel format, but perhaps HTML or XML or one of the other formats will be more readable by Excel.

    From there, I do not think that we will be able to provide any specific suggestions without a more specific, detailed description of what you are trying to do. A sample RTF file with the desired output as you would like it to appear in Excel would probably be useful -- maybe necessary -- to providing more specific help.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    08-31-2012
    Location
    Andromeda, Hawaii
    MS-Off Ver
    Excel 97/2003 and 5.0/97
    Posts
    49

    Re: Conversting RTF file into Excel file

    Good morning MrShorty! thanks for the quick respose and you are right it's Rich Text Format, the reason I wanted to convert the information from the RTF file into an Excel format is to read the information and transfer some of the data into my table in another workbook; I tried to convert the RTF into XML but the problem is the header (of each page) is not included and some of the information I needed is in that part.

    How I wish I can provide you a sample data but as for company rule it is against our code of conduct.

    I appreaciate any any recomendation you have for any format I can convert RTF that will include the Header and can be read by excel.

    Thanks again.
    Last edited by jdlc; 04-21-2016 at 09:19 AM.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Conversting RTF file into Excel file

    Do you not need any of the formatting information stored in the RTF file (font face, bold, etc.)?

    If the formatting information is not needed, then I would open the RTF file in a text editor (like Wordpad) that can read the RTF file, then save as a regular text file (*.txt). The .txt file will obviously not retain any formatting information, but all of the text information should still be there. Excel should be able to easily read the .txt file. If the file is in a delimited or fixed width format, then it should also be able to easily parse the text into columns using the Text Import Wizard or Text to Columns command.

  5. #5
    Registered User
    Join Date
    08-31-2012
    Location
    Andromeda, Hawaii
    MS-Off Ver
    Excel 97/2003 and 5.0/97
    Posts
    49

    Re: Conversting RTF file into Excel file

    Good morning MrShorty! I followed your advised and open the rtf in wordpad and save it as text and you are right all the information was there including the header and footer, but the columns is gone and all the information was aligned to the left. With the column is gone I have a hard time to identify which information should I pick up.
    Last edited by jdlc; 04-22-2016 at 08:22 AM. Reason: additional info

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Conversting RTF file into Excel file

    Did you parse the data using the Text Import Wizard or the Text to Columns command? https://support.office.com/en-us/art...b-534250ff9905

  7. #7
    Registered User
    Join Date
    08-31-2012
    Location
    Andromeda, Hawaii
    MS-Off Ver
    Excel 97/2003 and 5.0/97
    Posts
    49

    Re: Conversting RTF file into Excel file

    Hi MrShorty, please see the attached file for the RTF report that I tried to convert into excel format, I modify and cut some of the informations because it's 8K kb. Thanks in advance.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Conversting RTF file into Excel file

    That is a tough format to work with, mostly because (as you explained and I failed to understand), everything ends up in a single column. A few thoughts:

    1) I infer from the .rtf file that you (or someone) are generating these reports using Crystal Reports. If that is correct, I might go back to Crystal Reports and see if you can get it to output the data in a different format, other than .rtf. (https://wiki.scn.sap.com/wiki/displa...+Visual+Studio ) This page suggests that Crystal Reports can output directly to an .xls file, or to a .csv file or to a tab-delimited text (.ttx or .txt) file. These formats will probably be easier to import into Excel than the .rtf format you are currently getting.

    2) If it is absolutely necessary to work from the .rtf file, I would import the data as a single column just like you have it now. Then figure out a combination of lookup and reference functions to extract the desired information from the single column into the desired table format (https://support.office.com/en-us/art...__toc309306714 ). For example, =MATCH("*Agent Commission*",$A$1:$A$2000,0) will return 314, telling me that the "agent commission" section of the report begins in row 314. Then I can figure out other formulas to pull out the needed information from that section of the report.

    3) You said that you had successfully converted to xml or similar, but lost the "header" information. It might be worthwhile to explore these .xml files and see if you can import them into Excel, and manually add in the header information.

  9. #9
    Registered User
    Join Date
    08-31-2012
    Location
    Andromeda, Hawaii
    MS-Off Ver
    Excel 97/2003 and 5.0/97
    Posts
    49

    Re: Conversting RTF file into Excel file

    The report are extracted from one of our application and the output send it to the online crystal report from there we can save it into html, rpt, xls, doc and rtf. I did try to export it into excel (btw it's excel 5) the header is gone but the columns are there. As I said before without the header information of each page it's nothing but a garbage data.

    I have crystal report 9 at home and tried to convert the native format which is rpt into excel and it's work fine all the information I needed was transferred.The problem is the company don't have the license for crystal report and that's the reason I'm looking for a way to convert those files into format that can be read by excel.

  10. #10
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Conversting RTF file into Excel file

    The report are extracted from one of our application and the output send it to the online crystal report from there we can save it into html, rpt, xls, doc and rtf. I did try to export it into excel (btw it's excel 5) the header is gone but the columns are there.
    If it were me, I might put this question to a Crystal Reports support forum. Why does the online version remove header information when saved to xls format, and how can you get the online version of crystal reports to include header information when saving to xls format?
    Is it only the xls format that loses the header information, or do all but rpt and rtf lose the header information?
    I don't know if it will help, but what data in the sample rtf that you sent is the "header information" that gets lost?

  11. #11
    Registered User
    Join Date
    08-31-2012
    Location
    Andromeda, Hawaii
    MS-Off Ver
    Excel 97/2003 and 5.0/97
    Posts
    49

    Re: Conversting RTF file into Excel file

    all other format retain the header information except for xls. i will go to their forum and raised this question. The top information which contain the report type, the group name (corp name) are missing when I save it from crystal report to excel.

  12. #12
    Registered User
    Join Date
    08-31-2012
    Location
    Andromeda, Hawaii
    MS-Off Ver
    Excel 97/2003 and 5.0/97
    Posts
    49

    Re: Conversting RTF file into Excel file

    no worries MrShorty, i found a way have to all the informations i needed. I can close this thread now. many thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 12-23-2022, 04:03 AM
  2. [SOLVED] Convert txt. file to excel file <>excel to txt. File Layout 116 characters - price databas
    By costi_linho12 in forum Excel Programming / VBA / Macros
    Replies: 61
    Last Post: 10-05-2015, 01:33 PM
  3. Replies: 4
    Last Post: 10-23-2013, 12:54 AM
  4. Replies: 10
    Last Post: 06-07-2012, 09:17 AM
  5. XML file and Excel file, Find and Replace in XML from Excel file - URGENT
    By nikythebest in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2012, 03:15 PM
  6. Creating a .txt file extracting information from a Excel file saving as .resx file
    By AbdallahHajbed in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-19-2012, 09:00 AM
  7. [SOLVED] opening an excel file opens a duplicate file of the same file
    By skm in forum Excel General
    Replies: 1
    Last Post: 12-07-2005, 01:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1