CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 4 of 4

Thread: Convert csv to xls

  1. #1
    Join Date
    Jan 2013

    Convert csv to xls

    I need a program to convert csv to java under linux.(I dont like Perl, cause I dont underestand anything from it)
    everyday some csv files are generated which I need them to be automatically converted to xls.
    I need to modify csv thats why I need xls.

    I dont know if any other informaion is needed.
    I havent written anything because I am unable to write such a hard (for me) program.

    Thanks alot in advance.

  2. #2
    Join Date
    May 2006

    Re: Convert csv to xls

    We don't write code to order but we will guide you if you want to do it yourself and it's not that hard a task.

    EDIT: Ignore the paragraph below - I mis-read your post and thought you wanted to convert CSV to XML. has posted a good solution.

    To start with you need description of the data fields in the csv file and of the structure you want for the xml file.
    If the csv file is small you may decide to read in, parse it, build the xml DOM and then write it, alternatively if the csv is likely to be large it may be better to read the file one line at a time, parse it and write that chunk of data to the xml file.
    Last edited by keang; January 3rd, 2013 at 05:35 AM. Reason: Mis-read OP's question
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

  3. #3
    Join Date
    Dec 2012
    Danang, Viet Nam

    Re: Convert csv to xls

    Trying Apache POI.
    The Apache POI Project's mission is to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft's OLE 2 Compound Document format (OLE2). In short, you can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java. Apache POI is your Java Excel solution (for Excel 97-2008). We have a complete API for porting other OOXML and OLE2 formats and welcome others to participate.

  4. #4
    Join Date
    May 2013

    Re: Convert csv to xls

    Use Aspose.Cells for Java, it can easily convert csv file to xls or xlsx in java and you don't need to go through all the coding to convert your file

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)