Formatting Error While Reading Excel File using POI 2.5 Final Related

Hi All,
I am using poi-2.5-final-20040302.jar for my project to create excel files.
My system is having Microsoft Excel 2002 (SP-2) version, but my client is having Microsoft Office Excel 2003 (SP-3).
My problem is that I can download the excel file with no formatting issues , but client is not able to download the same and is getting error as
"Damage to the file was so extensive that repairs were not possible.Excel attempted to recover your formulas and values, but some data might have been lost or corrupted".
After getting above error message, they can open the file but the colours,fonts ie formatting will be lost and only data will be available in excel.
Can anyone help how to sort out ths issue.
Thanks in Advance,
Ravi

Sound like the Excel file is invalid... Maybe its outdated or corrupted or something. What would we know about that? POI has a mailing list.

Similar Messages

  • Error reading excel file using POI.

    Hi ,
    I am having some problem when reading the excel file.
    While reading excel file I am getting error-java.io.IOException: Unable to read entire block; 4 bytes read; expected 512 bytes.
    part of my code:-
    InputStream stream = objFormFile.getInputStream();
    POIFSFileSystem fs = new POIFSFileSystem(stream);//getting above error here.
    HSSFWorkbook wb = new HSSFWorkbook(fs);
    Case 1:
    I download the file on the system ,save it ,and then directly upload it to the system ,I get the above error .
    Case 2:
    It works fine if I download the excel and manually open and save it and then upload it .
    I am using JDK1.4.1 and poi-2.5.1-final-20040804.jar.
    Can any one please help me out for the above problem?
    Edited by: hruday on Jul 31, 2008 3:20 AM

    Instead of using POIFSFileSystem, try to directly create the HSSFWorkbook
    InputStream stream = objFormFile.getInputStream();
    //POIFSFileSystem fs = new POIFSFileSystem( stream );//getting above error here.
    HSSFWorkbook wb = new HSSFWorkbook( stream );

  • Error while accessing excel file using ODBC

    Hi
    I am getting the below error message while accessing excel sheet using ODBC from Oracle:
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from EXCL
    Can anyone help me on this...
    Cheers
    Pradeep
    Message was edited by:
    user634393

              Hi
              Thank you.Is there a way to read a file which is existing in the war file.
              Regards
              Anand Mohan
              "Wenjin Zhang" <[email protected]> wrote:
              >
              >In Weblogic, if your files are archived in a WAR, you cannot get an entry
              >as individual
              >file since it is only bytes in a large archive file. So getRealPath will
              >give
              >you null result. If you only want the path, try to use other getXXXPath,
              >getURL,
              >or getURI method. If you want to read the content, use getResource.
              >
              >
              >"Anand" <[email protected]> wrote:
              >>
              >>Hi
              >>I am having problem while accessing the file located in the server from
              >>a JSP
              >>page. I am not getting the RealPath from a JSP page using getRealPath(request.getServletpath()).
              >>
              >>The same code is working if the jsp placd under defaultwebApp directory
              >>and not
              >>working if i create a war and deploy the same.
              >>
              >>I am using weblogic server 7.0 trail version.I am setting the context
              >>path also.
              >>
              >>Can any help me in this regard.
              >>
              >>Thank And Regards
              >>
              >>Anand Mohan
              >
              

  • Error while reading excel file from application server into internal table.

    Hi experts,
    My requirement is to read an excel file from application server into internal table.
    Hence I have created an excel file fm_test_excel.xls in desktop and uploaded to app server using CG3Z tcode (as BIN file type).
    Now in my program I have used :
    OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    DO.
    READ DATASET v_filename INTO wa_tab.
    The statement OPEN DATASET works fine but I get a dump (conversion code page error) at READ DATASET statement.
    Error details:
    A character set conversion is not possible.
    At the conversion of a text from codepage '4110' to codepage '4103':
    - a character was found that cannot be displayed in one of the two
    codepages;
    - or it was detected that this conversion is not supported
    The running ABAP program 'Y_READ_FILE' had to be terminated as the conversion
    would have produced incorrect data.
    The number of characters that could not be displayed (and therefore not
    be converted), is 445. If this number is 0, the second error case, as
    mentioned above, has occurred.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
    caught and
    therefore caused a runtime error.
    The reason for the exception is:
    Characters are always displayed in only a certain codepage. Many
    codepages only define a limited set of characters. If a text from a
    codepage should be converted into another codepage, and if this text
    contains characters that are not defined in one of the two codepages, a
    conversion error occurs.
    Moreover, a conversion error can occur if one of the needed codepages
    '4110' or '4103' is not known to the system.
    If the conversion error occurred at read or write of  screen, the file
    name was '/usr/sap/read_files/fm_test_excel.xls'. (further information about
    the file: "X 549 16896rw-rw----201105170908082011051707480320110517074803")
    Also let me know whether this is the proper way of reading excel file from app server, if not please suggest an alternative .
    Regards,
    Karthik

    Hi,
    Try to use OPEN DATASET v_filename FOR INPUT IN BINARY mode encoding default. instead of OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    As I think you are uploading the file in BIN format to Application server and trying to open text file.
    Regards,
    Umang Mehta

  • Error  while  reading pdf file using adobe reader 8

    Hi ,
    I am using itextsharp for creating pdf file which contains 300 pages.
    When I tried to open that pdf file in adobe reader 5 , there is no issue . Its opening correctly. But When I 've tried to open it using adobe reader 8 . Its opening the file but I could read upto 156 pages out of 300. I couldn't read beyond that. Its displaying the following error message "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem" , "could not find the XObject named 'Xf2'." .
    Please help me to resolve the issue.
    Thanks,
    Tamil.

    Hi ,
    I am using itextsharp for creating pdf file which contains 300 pages.
    When I tried to open that pdf file in adobe reader 5 , there is no issue . Its opening correctly. But When I 've tried to open it using adobe reader 8 . Its opening the file but I could read upto 156 pages out of 300. I couldn't read beyond that. Its displaying the following error message "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem" , "could not find the XObject named 'Xf2'." .
    Please help me to resolve the issue.
    Thanks,
    Tamil.

  • Error while reading wsdl file

    I created and deployed a BPEL process with a JMS adapter and DB adapter.
    I have tested this and it works fine.
    After a few days, I try to open the project and the BPEL process, and click on the DB
    adapter and it throws an exception on the designer :
    "Error while reading wsdl file ... (wsdl file name) NULL Exception"
    This is hard to debug as the exception does not provide any info, NULL.
    This has happened several times for my project. The next time the JMS adapter hit the
    same exception while opening on designer. This one I notice happened after I imported
    a new schema file (xsd) into the BPEL process.
    Only way around that I have for this currently is to delete and recreate the adapters, which as time
    consuming as I have to re-create and re-assign a lot of the activities.
    Has anyone encountered this and is there a way to fix this without deleting/recreating the adapters ?
    Thanks.

    I experienced the same issue and found the cause and a workaround;
    "Error while reading wsdl file …. Exception: null"
    http://www.petervannes.nl/files/b7c08911ce3cde3677e2182bbc5f032a-47.php
    Edited by: 944333 on Jul 3, 2012 10:24 PM

  • Error while creating logical file using transaction FILE

    Hello there,
    I am facing an error while creating Logical File name definition using transaction FILE
    This is the input which I'm trying to give
    Logical file name: ZTEST
    Name : ZTEST
    Physical file : ZTEST_1<DATE><TIME>.csv
    Data format: ASC
    Application area: BW
    Logical path:ZTEST_1_DATAOUT
    when I tried to save it throws me an error like  ASSIGN_SUBSTRING_NOT_ALLOWED
    Please help.

    Hi,
    Please check the OSS Notes :
    Note 792061 - SP Case Locator: Dump: ASSIGN to a substring isn't allowed.
    SAP Note 1297989 - Short dump ASSIGN_SUBSTRING_NOT_ALLOWED
    Hope this solves the problem.
    -Vikram

  • Error in uploading excel file using Java pages

    Hello,
    We are using oracle ERP (R12.1.1) and we have developed one JSP page to upload an excel.
    After selecting the excel and browse button is clicked we are gettign the OLE stream error when the excel file is .csv or .xlsx. There is no issue with .xls excel files. For loading the excel data to custom table we are using the "jxl-2.6.jar".
    Can we get higher version of "jxl-2.6.jar to support CSV upload?
    Thanks.

    Are you Registered this jsp upload page to EBS before test?
    You have to register the page to EBS first.
    Regards,
    Dilip

  • Error while reading raw file created in previous task using raw file destination

    I am reading a flat file and creating an raw file using raw file destination.  path of the raw file is in a variable.  now I am reading the raw file using the rawfile source component. I am able to execute if the .raw file is available.  But
    when we deploy into the production the .raw will be created runtime, so the package is getting failed while evualting the variable which hold the path of the variable.  since the .raw is not available i am not able to proceed further. it's in ssis 2008
    r2
    Error at Load Data [Raw File Source [401]]: File "c:\test123.raw" cannot be opened for reading. Error may occur when there are no privileges or the file is not found. Exact cause is reported in previous error message.
    Error at Load Data [SSIS.Pipeline]: component "Raw File Source" (401) failed validation and returned error code 0x80004005.
    Error at Load Data [SSIS.Pipeline]: One or more component failed validation.
    Error at Load Data : There were errors during task validation.

    I am also using a raw file destination using a variable.
    I have set DelayValidation = true on both the DataFlow task and even the Sequence Container.
    I get the same error when I run the entire ssis package, however
    when I run the individual container or individual task it runs without an error.
    Also, something interesting is the error is not the same path as the variable name.
    Warning: The system cannot find the file specified.
    Error: File "C:\Users\MyName\AppData\Local\Temp\GUIDNumber\\RawFileName" cannot be opened for reading. Error may occur when there are no privileges or the file is not found. Exact cause is reported in previous error message.
    The variable is "C:\Temp\ProjectName\RawFileName"
    I have other RawFile sources in this same project, but only this one file is giving me grief.
    Any other suggestions?  Is this a bug?
    Have you set an expression for connection string property of raw file? Is it based on variable/expression or configuration? If yes, check the value of variable/ expression or configuraton item at runtime by putting a breakpoint in the pre execute event of task
    and make sure path value its getting is correct. It may be that path is getting a different value at runtime due to expression/configuration set for it.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • OPM Error while opening excel files

    When I open the excel file of my rule, it gives the following error.
    Oracle Policy Modeling
    An error occurred while opening the document 'C:\Documents and Settings\HCHATURV\Desktop\Customer Service\OPA\Development\Rules\Raise.xls': Unable to set the Installed property of the AddIn class
    OK
    I uninstalled OPA from my machine and again installed it but no result.
    I would be thankful If somebody can help.

    What version of OPA/OPM is this? What operating system & processor type (32 or 64 bit)? What version of Excel?
    Depending on what was active when installing or uninstalling, Excel may not be looking at the correct location of the OPM add-in. The one time I've seen this was with XP and Office 2007 (both 32 bit) which was solved by the following:
    1) Open the excel document outside OPM
    2) Select "Excel Options" from the Office Menu (circle at top left). Select "Add-Ins", then find "Manage: Excel Add-Ins", and click "Go...".
    3) Tick Oracle Policy Modeling Excel 2007 (if it is already ticked, try un-ticking, pressing okay, and ticking it again)
    4) Press OK
    5) Try opening the workbook again in OPM.
    I think if you can convince Excel that the add-ins isn't active any more, then OPM will be able to convince Excel to use the correct location.

  • Error while opening Excel file with Add-ins "CtExcelLinksWeb.xll" for BOFC

    Hi,
    While opening an excel sheet with the Add-ins, "CtExcelLinksWeb.xll", the following error is being displayed,
    The file you ar trying to open , "CtExcelLinksWeb.xll", is in different format than specified by the file extension.
    Verify that the file is not corrupted and is from a trusted source before opening the file. Do you wnat to open the file now?
    If any setting is required for solving the error kindly help me on it.
    Thanks
    Prity

    Hi ,
    I think you are using older version,use microsoft excel 2007 version,then it will opens.
    Regrads,
    SVS
    Edited by: svskumar on Aug 19, 2010 12:18 PM

  • Error while saving xml file using PDFDocument API

    Hi,
    I am trying to save xml file using byte array obtained from interactive form element in webdynpro java.
    The file gets saved but I get fllowing error message when I open the file.
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    An invalid character was found in text content. Error processing resource 'http://uxjciesk.wdf.sap.corp:50000/irj/go/km/doc...
    The code I am trying to achieve the functionality is:
    byte[] byteArray  = wdContext.currentContextElement().getPdfSource();
    IWDPDFDocumentHandler pdfDocumentHandler = WDPDFDocumentFactory.getDocumentHandler();
    IWDPDFDocumentAccessibleContext documentAccessibleContext = pdfDocumentHandler.getDocumentAccessibleContext();
    documentAccessibleContext.setPDF(byteArray);
    IWDPDFDocument pdfDocument = documentAccessibleContext.execute();
    ByteArrayInputStream dataInputStream = (ByteArrayInputStream) pdfDocument.getPDFAsStream();
    further, the datainputstream is used to store the file. I am able to save same xdp template in pdf file format successfully, the error only occurs for xml file storage.
    Please, advise.
    Regards,
    Urvashi

    Hi Urvashi,
        Try this code
              String contentStr = getXMLData(wdContext.currentContextElement().getPdfSource().read(false));
              String data = "";
              ByteArrayOutputStream pdfSourceOutputStream = new ByteArrayOutputStream();
              try {
                   InputStream pdfSourceInputStream = wdContext.currentContextElement().getData().read(false);
                   BufferedInputStream bufferedInputStream = new BufferedInputStream(wdContext.currentContextElement().getData().read(false));
                   int aByte;
                   while ((aByte = bufferedInputStream.read()) != -1) {
                        pdfSourceOutputStream.write(aByte);
                   pdfSourceOutputStream.flush();
                   pdfSourceOutputStream.close();
                   IWDPDFDocument pdfDocument = null;
                   try {
                        // Create an instance for PDFDocumnetHandler
                        IWDPDFDocumentHandler pdfDocumentHandler = WDPDFDocumentFactory.getDocumentHandler();
                        //Create an Inatance for PDFDocumentAccessibleContext
                        IWDPDFDocumentAccessibleContext documentAccessibleContext =     pdfDocumentHandler.getDocumentAccessibleContext();
                        //set the pdf data as OutputStream to the PDFDocumentAccessibleContext instance
                        documentAccessibleContext.setPDF(pdfSourceOutputStream);
                        //call the server to get the data                      
                        pdfDocument = documentAccessibleContext.execute();
                        //get the xml data in a InputStream
                        ByteArrayInputStream dataInputStream = (ByteArrayInputStream) pdfDocument.getData();
                   } catch (Exception e) {
                        data = "Null";
              } catch (IOException e) {
    Regards,
    Mathan

  • Get different format error when opening excel file

    Hi,
    In 10g form, I use CLIENT_OLE2 to generate an excel file on the client machine. Every time, I open the excel file, I get the error message, 'The file you are trying to open, 'my1.xls', is in a different format than specified by the file extension....'. However, I still can open the excel file. I am using excel 2007.
    Could somebody please explain what the problem is? How should I solve this problem?
    Thanks for your help.
    neemin

    I don't know that off the top of my head. When I have developed OLE code in Forms I found it very useful to make a Excel macro that did what I wanted to accomplish and the translate that to OLE code in Forms.
    I encourage you to create a new forum entry for this second issue. Maybe someone else has done it and can give you a quick answer.

  • Error while opening Excel report using servlet

    Hi
    I am using a servlet to open an excel report which has multiple sheets . But there is a weird problem when i try to open an excel report with two sheets having the same name .
    Generally when an excel with same sheet names is opened with Microsoft excel , it will open the excel file with a dialog showing error .
    But when i am trying to open through a servlet after that open/save dialog box comes , its sending two requests and that too the second one from another browser . How i am saying that its sending from another browser is , during the second time its not passing the session checks which i placed .....I mean the session for the request doesn't have any data while it was expected to have some data which i placed in Session while logging in .
    Can any one let me know why this is happening ?/

    Refer Note:280376.1 on MetaLink. Hope this will help you resolve the issue.
    Thanks
    Shail

  • Error while uploading a file using ke13 transactoin

    Hi..
    We have the following error when uploading a project plan by cost element excel upload using KE13 transaction...
    There is a z program that calls this ke13 program while uploading. The excel file is split into x files and uploaded..
    THe error is: Quantity Unit HR cannot be converted to & and error occured when generating data for planning processor...
    Any idea if someone face similar situation..
    Any clue would help us..
    Thanks,
    Kanthi.

    Hi,
        Covert quantity to char and upload the data.
    Regards
    Amole

Maybe you are looking for

  • Ipad OS4.3.1 won't connect with bluetooth to iPhone 3GS OS 4.3.1

    The two devices paired and connected at first but now refuse to talk to each other. Like some married couples I know! I want to tether the WiFi iPad to the Telstra (Australia) 3GS iPhone. It should be possible. The iPhone General settings seem to all

  • Help! Video filters seem to be disabled...

    I'm working on another person's Mac and I ran into an issue that I haven't encountered before. When I apply a Video Filter to a clip, it allows me to adjust it (Viewer), but it doesn't affect the clip at all (Canvas). And I made sure the Filter's Dis

  • Deferred tax transfer - S_AC0_52000644

    Hi, In this report, I have number of line itmems, when i try to post morethan one line item, its taking only one line item. When I click on post tax document  all the selected line items to be transfer to tax payable account. Please help me.

  • Changing order of elements

    I have 2 interfaces and mapping. I need to change the order of XML elements in resulted XML. I have changed the order in DataType (for second XML) but it doesn't work. example: Interface 1 <data>   <name></name>   <title></title> </data> Interface 2

  • Word Macros InDesign

    I followed all of the steps for using Word to write my scripts for InDesign.  It is a simple macro to go to the start of the line and delete 5 characters. Sub DeleteFive() ' DeleteFive Macro     Selection.HomeKey Unit:=wdLine     Selection.Delete Uni