Forum Stats

  • 3,852,403 Users
  • 2,264,102 Discussions
  • 7,905,060 Comments

Discussions

Can't see some data in excel after using the export_excel package

627274
627274 Member Posts: 97
edited Oct 24, 2008 2:49PM in APEX Discussions
After using the the export_excel package some cells in the spreadsheet display '###########'. If the cell is selected the data will show but it disappears when you leave the cell and try to print it. Does anyone know what is causing this problem?

Thanks

Best Answer

  • ATD
    ATD Member Posts: 11,184
    Answer ✓
    Hi,

    According to the following link, the maximum width of a column in Excel 2000 is 255 characters: http://support.microsoft.com/kb/264626

    So, it looks like you may have to either upgrade, split the cell into 2 or more cells or add in some linefeeds?

    Andy
«1

Answers

  • ATD
    ATD Member Posts: 11,184
    Hi,

    This is an Excel issue rather than an Apex one. Excel is not making the column wide enough to display the full contents of the cells. Double-click on the black vertical line to the right of the column letter and it should make the column wide enough to display all the data. Alternatively, which is what I tend to do, select the entire spreadsheet, select Format, Column, Autofit Selection from the menu and it will adjust the widths of all columns.

    Andy
  • 627274
    627274 Member Posts: 97
    Andy,

    I tried that before and the data still disappeared. Strange.

    Thanks
  • ATD
    ATD Member Posts: 11,184
    Hi,

    As long as all styling (eg, colours and borders) and formatting (eg, date/number formats) has already been applied, then adjusting the width of the column to fit the contents is all you should need to do.

    Sometimes, when printing, the #'s reappear but that it usually when you are using a fit-to-page page setup that causes Excel problems with font sizes.

    Andy
  • 627274
    627274 Member Posts: 97
    Andy,

    I think this problem is related to the declaration of the field. One of the fields that has this problem is declared as varchar2(4000). it has a column width of 500px on the form and is declared as a textarea. The field had 357 characters and when it was reduced to 284 it printed without a problem. However, the same field in another record with 282 character printed with the '#################'.

    Thanks
  • ATD
    ATD Member Posts: 11,184
    Hi,

    I don't think that the field's datatype is an issue. I've just created a table with a varchar2(4000) field and populated it with a string over 2,000 chars in length, put this on a report and set that field to a TextArea field as well. The export works ok. Try: http://htmldb.oracle.com/pls/otn/f?p=45958:15

    When printing, the output will only display a cell on one page - ie, it will not span onto multiple pages. However, when I do this on the above, after opening the exported csv file into Excel, the report will shows proper text, even though it is restricted to the width of the page. You can select the column and ask it to wrap the text within the cell: Select the column, then select Format, Cells from the menu and then click the Alignment tab and tick the Wrap Text option. You should also specify a width for the column to try and fit the data onto a page: Select the column, then select Format, Column, Width from the menu and enter in a number (up to a max of 255).

    Andy
  • sect55
    sect55 Member Posts: 1,106 Bronze Badge
    <p>


    I am having the same problem.



    Andy, your example uses CSV not the export excel package. It works fine with the CSV download (default) but when you use Denes K.'s export excel package, you get #######################. There seems to be a length limit setting not related to the font. The value is there but it only shows when you edit (or view) the cell but it is displayed as #### in the cell.



    Robert
    </p>
  • ATD
    ATD Member Posts: 11,184
    I can't see that's there's anything specifically wrong with the export package - it only sets the default widths of columns. Denes may like to take a look at this.

    Andy
  • 627274
    627274 Member Posts: 97
    Denes,

    Can you look at this problem? It is occurring when the excel export package is used.

    Thanks
    SRQ
  • Denes Kubicek
    Denes Kubicek Member Posts: 6,163 Bronze Crown
    Well, I did check:

    http://apex.oracle.com/pls/otn/f?p=31517:108

    and the results I'm getting are fine.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------
  • ATD
    ATD Member Posts: 11,184
    Thanks for checking Denes - the report downloads fine for me as well.

    Robert/SRQ - the only thing I can think of is that this is an Excel issue - what version of Excel are you using? It worked ok in Excel 2003

    Andy
This discussion has been closed.