HTML version of workbook displays without borders in Google Chrome

Last post 09-21-2010, 7:33 AM by aspose.notifier. 15 replies.
Page 1 of 2 (16 items)   1 2 Next >
Sort Posts: Previous Next
  •  09-02-2010, 6:49 AM 256804

    HTML version of workbook displays without borders in Google Chrome Java

    Hi,

    When we export workbooks to html and view them in Google Chrome, no borders appear. Is this something you can fix in the generated style sheets?

    Thanks and Best Regards,
    Ulf
     
  •  09-02-2010, 2:52 PM 256886 in reply to 256804

    Re: HTML version of workbook displays without borders in Google Chrome

    Hi Ulf,

    Thanks for your post.

    Could you please provide a sample Excel Workbook demonstrating the issue? Such sample file would really be helpful in order to reproduce and further investigate the issue on our side.

    Kind Regards

    Muhammad Sabir
    Support Assistant Manager
    Aspose Sialkot Team
    http://www.aspose.com
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  09-03-2010, 7:21 AM 256965 in reply to 256886

    Re: HTML version of workbook displays without borders in Google Chrome

    Attachment: Present (inaccessible)
    Hi,

    Please see the attached screenshot and the file used to build that html page.

    Best Regards,
    Ulf Ekström
     
  •  09-03-2010, 2:58 PM 257045 in reply to 256965

    Re: HTML version of workbook displays without borders in Google Chrome

    Hi Ulf,

    Thanks for providing the sample file.

    Based on this sample file, we were able to reproduce the issue. We have logged this issue in our Issue Tracking System as 19805. We will update you about the further proceedings regarding this issue as this thread has been linked with the said issue.

    Kind Regards

    Muhammad Sabir
    Support Assistant Manager
    Aspose Sialkot Team
    http://www.aspose.com
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  09-06-2010, 5:23 AM 257183 in reply to 257045

    Re: HTML version of workbook displays without borders in Google Chrome

    Attachment: Present (inaccessible)
    Hi,

    Please try the new fix V2.4.0.3 (attached), we have fixed the issue of border.


    Thank you.



    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  09-06-2010, 12:44 PM 257264 in reply to 257183

    Re: HTML version of workbook displays without borders in Google Chrome

    Attachment: Present (inaccessible)
    Hi,

    Thanks for the fix. However, the fix shows the same problem. Attached are two files generated with version 2.4.0.3.  There are still no borders when I view the  html file in Chrome.

    Thanks for checking this again.

    Best regards,
    Ulf Ekström
     
  •  09-07-2010, 12:23 AM 257280 in reply to 257264

    Re: HTML version of workbook displays without borders in Google Chrome

    Hi,

    After further investigation, I am afraid it is a bug of the Google Chrome. Even opening the generated html file by MS Excel itself, the borders are invisible in Google Chrome, you may confirm it.
     
    Thank you


    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  09-08-2010, 2:07 AM 257520 in reply to 257280

    Re: HTML version of workbook displays without borders in Google Chrome

    Hi,

    Thanks for your help on this problem. I looks like we will be able to workaround the problem by increasing the border widths.

    When we changed the borders from .5pt to 1pt in the output HTML file they look the same in both Chrome and IE.  I guess that means that we can increase the borders in the Excel file before saving as HTML.

    What is the relation between Excel border and the style sheet border (in pt) that you output?  I know W3C does not recommend pt for viewing HTML online. It is supposed to be used for printing purposes. http://www.w3.org/Style/Examples/007/units

    Maybe this is why Chrome displays the borders differently?

    Best regards,
    Ulf
     
  •  09-08-2010, 3:19 AM 257534 in reply to 257520

    Re: HTML version of workbook displays without borders in Google Chrome

    Hi again,

    Just tried the following code:

     if (browser.isBrowser(TEBrowserIdentity.BROWSER.CHROME)) {
                
                Iterator<Cell> cells = iSheets.getSheet(0).getCells().getCellIterator();
                while (cells.hasNext()) {
                    Cell cell = cells.next();
                    Style style = cell.getStyle();
                  
                    style.setBorderLine(BorderType.TOP, BorderLineType.MEDIUM);
                    style.setBorderLine(BorderType.BOTTOM, BorderLineType.MEDIUM);
                    style.setBorderLine(BorderType.LEFT, BorderLineType.MEDIUM);
                    style.setBorderLine(BorderType.RIGHT, BorderLineType.MEDIUM);


                    cell.setStyle(style);
                }
            }

    and the borders are showing nicely in Chrome.  

    However, there is one problem. Executing the code above turns all borders black, even the previously white borders in the example file attached to this thread. Am I doing something wrong or is it a bug?

    Thanks for looking into this.

    Best regards,
    Ulf
     
  •  09-08-2010, 3:40 AM 257539 in reply to 257534

    Re: HTML version of workbook displays without borders in Google Chrome

    Hi,


    Well, if the thicker borders give the result you required, we think you can set the border line type as MEDIUM, THICK or DOUBLE.

     

    Thank you.





    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  09-08-2010, 5:05 AM 257565 in reply to 257539

    Re: HTML version of workbook displays without borders in Google Chrome

    Hi,


    Well, it is sure that the borders will be set for all cells by your code. To change the border type of the existing borders, your code should be changed a bit like the following:

     

                    ...

                    if(style.getBorderLine(BorderType.TOP) != BorderLineType.NONE)

                    {

                        style.setBorderLine(BorderType.TOP, BorderLineType.MEDIUM);

                    }

                    ...


    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  09-08-2010, 5:44 AM 257576 in reply to 257565

    Re: HTML version of workbook displays without borders in Google Chrome

    Hi,

    Yes, of course the borders are set for all cells with my code. But all our cells have borders. They all have THIN borders and some are white and some are black. Why does setBorderLine change the color of the border?

    Best regards,
    Ulf
     
  •  09-09-2010, 1:59 AM 257730 in reply to 257576

    Re: HTML version of workbook displays without borders in Google Chrome

    Hi Ulf,

    We are looking into your issue regarding border's color. We will update you once we figure out your issue.

    Thank you.

    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  09-09-2010, 5:31 AM 257765 in reply to 257730

    Re: HTML version of workbook displays without borders in Google Chrome

    Hi,


    After checking the borders in your template file, we found that those cells that have white borders only have TOP and LEFT borders. But your code will add RIGHT and BOTTOM borders for them and because there is no custom colors for the newly added RIGHT and BOTTOM borders, so they will use the default color, that is black. And being different from IE, it seems that google chrome will use the RIGHT and BOTTOM borders of one cell to overlap the TOP and LEFT borders of the prior cell. So in google chrome, the borders will be shown as black. If you change your code as what we suggested in the previous reply, the generated html file will be ok in google chrome.


    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  09-09-2010, 6:03 AM 257774 in reply to 257765

    Re: HTML version of workbook displays without borders in Google Chrome

    Thank you so much!

    Regards,
    Ulf
     
Page 1 of 2 (16 items)   1 2 Next >
View as RSS news feed in XML