Read word/excel doc and convert to pdf

Can any one suggest a way or source to read a word/excel document and convert it to an PDF.. using Java

Parse the Excel document with the Apache POI API and generate a PDF document with the Apache FOP API.

Similar Messages

  • Read a Word/Excel doc and convert to PDF

    Can any one suggest a way or source to read a word/excel document and convert it to an PDF.. using Java
    Thanks,
    Satya

    Parse the Excel document with the Apache POI API and generate a PDF document with the Apache FOP API.

  • Read an excel file and convert to a 1-D array of long, 32-bit integer?

    My vi right now reads an column of numbers as a 1-D array, but I need to input the numbers manually, and for what I'm trying to do, there could be anywhere between 100 to 500 numbers to input. I want the vi to be able to read the excel file and use that column of numbers for the rest, which the data type is long (32-bit integer).
    I have an example vi that is able to get excel values, but the output data type is double (64-bit real).
    I need to either be able to convert double(64-bit real) data to long (32-bit integer), or find another way to get the values from the excel file.

    Just to expand on what GerdW is saying.  There are many programs that hold exclusive access to a file.  So if a file is opened in Excel, the LabVIEW cannot access the file.
    What is the exact error code?  Different error codes will point to different issues.
    Make sure the csv file is exactly where you think it is and LabVIEW is pointing to the right place.  (I'm just going through stupid things I have done)
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Will buzzword allow to upload word template, edit and convert to PDF.

    Hi,
    we have a module in our project where we need to Upload a word template - Edit the template - and save the changes - and attach exisitng uploaded files (for e.g. Word, excel and pdf file) and convert the word template along with the attached file into single PDF.
    So is this possible?
    Can any one help me in this?
    Is there any free download?

    Hello,
    Buzzword is an online word processor that will absolutely allow you to upload a word .doc, edit it in Buzzword format, then export as a PDF. The one part that you can't do with Acrobat.com is to merge files - so you'd either need to merge the word .docs first and then upload, or use Adobe Acrobat desktop software if you need to merge PDF files. There is nothing to download as this is an online tool. Basic accounts are free - you can sign up at www.acrobat.com.
    Please let me know if you have additional questions or concerns.
    Kind Regards,
    Michelle

  • With Adobe Illustrator I may open doc documents(word) and convert to pdf

    With Adobe Illustrator I may open doc documents(word) and convert to pdf ?

    Ise,
    You can, although (maybe) only the first page of the .doc; this may depend on the Illy version.

  • I want to create a Pdf file - do i misunderstand the product?  I thought i could create a PDF similar to excel or word file or do i have to create there and convert to PDF? I bought the pack for $89.PDF Pack!

    I want to create a Pdf file - do i misunderstand the product?  I thought i could create a PDF similar to excel or word file or do i have to create there and convert to PDF? I bought the pack for $89.PDF Pack!

    Hi Brian,
    You can create it in Word or excel and then you can Convert it into .pdf Format
    Here's a feature list that depicts benefits of PDF pack: Convert Word to PDF, Convert PDF to Word & Merge PDFs | Adobe PDF Pack
    Please revert back if you have any other questions or need any help.
    Regards,
    Rahul

  • CANNOT DISPLAY A WORD/EXCEL DOC IN BLOB FIELD INTO A PDF REPORT

    We created a report that should display several kinds of documents at one time.
    These documents are stored in BLOB columns in database. We had no problem to
    display txt, gif or jpeg, but we could not display doc, xls, pdf or html
    documents.
    In this report we set three different fields in which display different kinds
    of documents depending on mimetype. The first field has FileFormat property set
    to 'Text' in order to display 'text/plain' and 'text/html' mimetype documents.
    The second field has it set to 'Image', which allow to display 'image/bmp',
    'image/gif', 'image/x-png', 'image/pjpeg' mimetypes. The third field has this
    property set to 'OLE2', and here is where we would like to display other
    mimetype documents as 'application/msword', 'application/vnd.ms-excel',
    'application/pdf'.
    We run the report on the web using:
    http://<server>:<port>/dev60cgi/rwcgi60
    ?server=<report_server>
    &report=<rdf_name>
    &destype=localfile
    &desname=<report_name.pdf>
    &userid=<user>/<password>@orcl9i
    &desformat=pdf
    <6meters>
    I have already read a lot of notes in Metalink but I could not find any
    solution. Is there any way to display a Word/Excel document from database in a
    report?
    We tried to convert Word/Excel docs to html format, but when we tried to
    display an HTML document in the report, we found that Oracle Reports displays
    the source code instead of the HTML format document. So, this did not work.
    What can we do?
    We also read somewhere that a possible solution would be to convert Word/Excel
    documents to a common format like GIF, JEPD or PDF. If processed as gif or jped
    the file could be displayed in the report. If processed as pdf the document
    could be linked in the report.
    I tried to display a PDF in the report but a blank box is displayed. How can I
    do this too?
    Any solutions?

    Hi,
    I have the same problem. I need to show up a BLOB, word file(.doc), in a custom report. I made a simple query, extracting file_date( the column having the blog (.doc) file) from the database, in the report and placed it on a layout by assigning it to a field "F_1". I addressed the file format as OLE2.
    But when I run the Report in APPS, it shows up an error "REP-1814: Report cannot be formatted. Object 'horizontally and vertically' can never fit within 'F_1'.". I also played with the layout by changing its size but the response had no change.
    I am using Reports6i and the output format of the report is PDF. Is there a way to resolve the issue? Please share the solution if you have any for this.

  • All my excel files were converted to pdf. Why would this happen and how do i stop it from doing so?

    All my excel files were converted to pdf. Why would this happen and how do i stop it from doing so?

    shloimypt wrote:
    All my excel files were converted to pdf. Why would this happen and how do i stop it from doing so?
    Relax, they weren't converted to PDF.
    You can tell by right clicking ANY of them and choosing "Properties". You'll see there that they're STILL .xls or .xlsx files. The "association" has changed and Windows now indicates that they open with Reader, which isn't right.
    Where it says "Open With" under the General tab, you can click "Change" and re-select Excel as the default app to open thim.
    See: http://helpx.adobe.com/acrobat/kb/application-file-icons-change-acrobat.html

  • Convert doc and xls to pdf UNIX

    Hi all!
    I have a problem.
    I need a software that make a conversion of documents DOC and XLS to PDF, but specify for Unix (IBM AIX). I have a Dms server(UNIX) with douments doc an xls, and i want lead the document to the portal in PDF format.
    Thank you

    kelvin_nitk wrote:
    Thanks anyways, I feel POI is not the solution for my problem.If your requirement is that your PDF should look exactly like what happens when you load a document into Excel and then have Excel output it to a printer, then you are correct. Unfortunately nothing else is the solution for your problem, either, except trying to not have that requirement any more.
    Unless you can cobble something together where you actually run Excel and persuade it to output using a PDF printer driver like the one the previous poster described, or like PDFCreator which I use to make things into a PDF. But you're much more likely to get all those bits working together with something that can manipulate Windows internal things better than Java can.

  • Open excel,doc and ppt

    how to open excel , doc and ppt files with air application

    Acrobat Version
    not have word………………
       not have word………………
    My office2010 subversion is 14.0.5128.5000(32bit),the office 64bit version i have tried,but have the same problem also.
    Now i try to install Office 2010 sp1,i will tall you the result later,thank a lot.

  • How to  read from excel file and write it using implicit jsp out object

    our code is as below:Please give us proper solution.
    we are reading from Excel file and writing in dynamicaly generated Excel file.it is writing but not as original excel sheet.we are using response.setContentType and response.setHeader for generating pop up for saveing the original file in to dynamically generated Excel file.
    <%@ page contentType="application/vnd.ms-excel" %>
    <%     
         //String dLoadFile = (String)request.getParameter("jspname1");
         String dLoadFile = "c:/purge_trns_nav.xls" ;
         File f = new File(dLoadFile);
         //set the content type(can be excel/word/powerpoint etc..)
         response.setContentType ("application/msexcel");
         //get the file name
         String name = f.getName().substring(f.getName().lastIndexOf("/") + 1,f.getName().length());
         //set the header and also the Name by which user will be prompted to save
         response.setHeader ("Content-Disposition", "attachment;     filename="+name);
         //OPen an input stream to the file and post the file contents thru the
         //servlet output stream to the client m/c
              FileInputStream in = new FileInputStream(f);
              //ServletOutputStream outs = response.getOutputStream();
              int bit = 10;
              int i = 0;
              try {
                        while (bit >= 0) {
                        bit = in.read();
                        out.write(bit) ;
    } catch (IOException ioe) { ioe.printStackTrace(System.out); }
              out.flush();
    out.close();
    in.close();     
    %>

    If you want to copy files as fast as possible, without processing them (as the DOS "copy" or the Unix "cp" command), you can try the java.nio.channels package.
    import java.nio.*;
    import java.nio.channels.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    class Kopy {
         * @param args [0] = source filename
         *        args [1] = destination filename
        public static void main(String[] args) throws Exception {
            if (args.length != 2) {
                System.err.println ("Syntax: java -cp . Kopy source destination");
                System.exit(1);
            File in = new File(args[0]);
            long fileLength = in.length();
            long t = System.currentTimeMillis();
            FileInputStream fis = new FileInputStream (in);
            FileOutputStream fos = new FileOutputStream (args[1]);
            FileChannel fci = fis.getChannel();
            FileChannel fco = fos.getChannel();
            fco.transferFrom(fci, 0, fileLength);
            fis.close();
            fos.close();
            t = System.currentTimeMillis() - t;
            NumberFormat nf = new DecimalFormat("#,##0.00");
            System.out.print (nf.format(fileLength/1024.0) + "kB copied");
            if (t > 0) {
                System.out.println (" in " + t + "ms: " + nf.format(fileLength / 1.024 / t) + " kB/s");
    }

  • How can one  read a Excel File and Upload into Table using Pl/SQL Code.

    How can one read a Excel File and Upload into Table using Pl/SQL Code.
    1. Excel File is on My PC.
    2. And I want to write a Stored Procedure or Package to do that.
    3. DataBase is on Other Server. Client-Server Environment.
    4. I am Using Toad or PlSql developer tool.

    If you would like to create a package/procedure in order to solve this problem consider using the UTL_FILE in built package, here are a few steps to get you going:
    1. Get your DBA to create directory object in oracle using the following command:
    create directory TEST_DIR as ‘directory_path’;
    Note: This directory is on the server.
    2. Grant read,write on directory directory_object_name to username;
    You can find out the directory_object_name value from dba_directories view if you are using the system user account.
    3. Logon as the user as mentioned above.
    Sample code read plain text file code, you can modify this code to suit your need (i.e. read a csv file)
    function getData(p_filename in varchar2,
    p_filepath in varchar2
    ) RETURN VARCHAR2 is
    input_file utl_file.file_type;
    --declare a buffer to read text data
    input_buffer varchar2(4000);
    begin
    --using the UTL_FILE in built package
    input_file := utl_file.fopen(p_filepath, p_filename, 'R');
    utl_file.get_line(input_file, input_buffer);
    --debug
    --dbms_output.put_line(input_buffer);
    utl_file.fclose(input_file);
    --return data
    return input_buffer;
    end;
    Hope this helps.

  • Read a excel file and split its sheets to seperate file ?

    Dear all :
    How to split a excel file into several file, each have one sheet.my code is as below,thanks:
    import org.apache.poi.hssf.usermodel.*;
    import java.io.*;
    import java.util.*;
    import org.apache.poi.poifs.filesystem.*;
    public class Extractxls {
    public static void main(String[] args) throws Exception
    try {
    POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(args[0]));
    HSSFWorkbook wb = new HSSFWorkbook(fs);
    int sheetCount = wb.getNumberOfSheets();
    System.out.println(sheetCount);
    try {
         while(sheetCount > 0) {
         sheetCount--;
         HSSFWorkbook wb1 = new HSSFWorkbook();
         HSSFSheet s = wb1.createSheet();
         String sheetName = wb.getSheetName(sheetCount);
         HSSFSheet sheet = wb.getSheet(sheetName);
    //     HSSFSheet sheet = wb.getSheetAt(sheetCount);
         System.out.println(sheet.toString());
         s = sheet;
    FileOutputStream fileOut = new FileOutputStream("atest" + sheetCount + ".xls");
    wb.write(fileOut);
    fileOut.close();
    } catch (Exception e) {
         System.err.println("Error: " + e.getMessage());
    } catch (Exception e) { e.toString();}

    The HSSFWorkbook class is part of the POI project:
    http://jakarta.apache.org/poi/
    Regards,
    Dave Gilbert
    JFreeChart Project Leader
    I understand poi porject, my problem is that POI can not read a excel file and split its sheets into seperate file (each have one sheet) ?Does any one know how to do it.

  • Reading in any file and converting to a byte array

    Okay what I am trying to do is to write a program that will read in any file and convert it into a int array so that I can then manipulate the values of the int array and then re-write the file. Once I get the file into an int array I want to try and compress the data with my own algorithm as well as try to write my own encryption algorithm.
    What I have been looking for is code samples that essentially read in the file as a byte array and then I have been trying to convert that byte array into an int array which I could then manipulate. So does anyone have any sample code that essentially takes a file and converts it into an int array and then converts it back into a byte array and write the file. I have found code that is close but I guess I am just too new to this. Any help would be appreciated.

    You can read a whole file into a byte array like this:File f = new File("somefile");
    int size = (int) f.length();
    byte[] contents = new byte[size];
    DataInputStream in = new DataInputStream(
                              new BufferedInputStream(new FileInputStream(f)));
    in.readFully(contents);
    in.close();Note that you need to add in the proper exception handling code. You could also use RandomAccessFile instead of the DataInputStream.
    Writing a byte array to a file is easier; just construct the FileOutputStream, call write on it with the byte array, and close the stream.

  • When converting multiple word and excel docs to a combined PDF random pages have blue background in the finalized PDF.

    I have a user using Acrobat 10. It was installed two weeks ago and initially had no problems. Today she reported that when she tries to convert multiple word and excel docs by selecting them, and right clicking on them to select convert/combine to PDF, random pages in the finished PDF have a blue background. I did some searching online and can find no information about this problem. Can anyone here shed some light on this issue and maybe point me in the direction of a solution? Any help is appreciated. Thanks!

    Hi Gilad,
    So, something I didn't consider was that this could be a setting in the office docs. The reason I didn't consider this was be cause we tested multiple docs and had similar results each time. I went back and looked into this possibility and found a setting in word that was causing this issue. Although the word doc showed no page color when opened in word, if I went to "Page Layout" -> "Page Color", a shade of blue was selected. By selecting "No Color", and then converting/combining the docs to PDF we got the desired result. Thanks again for your reply!

Maybe you are looking for

  • Reports in CRM

    Hi, I'm very new to this group will anybody plz let me know about the reports asked by the client in CRM opportunities,Leads,Activities and Marketing. Thanks, sowji

  • Converting RAW files to view in PSE 6

    I recently purchsed an Olympus pen PL-1 and I am unable to view the RAW (.ORF) files in PSE v6 - any ideas?

  • Can you control Apple TV via LAN from 3rd party control such as AMX or Crestron?

    I would like to know if you can control an Apple TV via LAN with a 3rd party control AMX or Crestron - is there an API available for this? Two way communication would be ideal!

  • Java3D applet deployment -- download extension

    Hi, I need to deploy an applet using Java3D package. Trying to avoid the installation hassle (on the client side), I want to put the three packages available on the server (j3dcore.jar, j3dutils.jar, vecmath.jar), and then add the class path of these

  • C3 did not work with all the types of routers

    Hi! My problem is with the C3 (Hungarian 03.36 Vodafone), that the e-mail program is not working with all the wlan routers. My home router is Asus WL-520GC and with it I get communication error, but with a Linksys or a Tplink router everything is goo