Convert HTML-table to Excel using VBA

后端 未结 9 2114
难免孤独
难免孤独 2021-02-05 02:51

Convert HTML-table to Excel

The code below fetches the HTML-table at https://rasmusrhl.github.io/stuff, and converts it to Excel-format.

The pr

9条回答
  •  佛祖请我去吃肉
    2021-02-05 03:10

    Based on the documentation from Microsoft MSDN Library: WebFormatting Property you could try the below change to your code:

     .WebFormatting = xlWebFormattingNone
    

    This may allow the data to be copied without any number formatting - then you can set your own number format for those cells (using MSDN: Excel VBA NumberFormat property )

    A similar solution should solve the issue with numbers being truncated or rounding - set the decimal points for the affected cells in your target range...

提交回复
热议问题