Coder Social home page Coder Social logo

tablepyxl's People

Contributors

bmdavi3 avatar mdrewph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tablepyxl's Issues

Can we save multiple tables in a csv?

I was trying to save multiple tables in the same csv (Same Sheet). For this, I simply concatenated the second table in the string of the first table, however, the library only writes the first table, leaving out the second one. Is there any other way to do so?

IndexError: At least one sheet must be visible

when trying to write multiple tables in html to one wb it gives me this error. ur manual isnt very clear, u should refine it. how to write many tables to one wb, in same sheet or not, doesnt really matter. also, what about if tables don't have a name or id ? what should b the requirements for this ?

AttributeError: 'MergedCell' object attribute 'value' is read-only

Is it possible to make such a table?

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    table {
      border-collapse: collapse;
    }

    table, th, td {
      border: 1px solid black;
    }

    th, td {
      padding: 8px;
      text-align: left;
    }
  </style>
</head>
<body>

<table>
  <tr>
    <th rowspan="2">Name</th>
    <th rowspan="2">Measure</th>
    <th colspan="3">Plan</th>
    <th colspan="3">Fact</th>
    <th rowspan="2">%</th>
  </tr>
  <tr>
    <th>Volume</th>
    <th>Price</th>
    <th>Total price</th>
    <th>Volume</th>
    <th>Price</th>
    <th>Total price</th>
  </tr>
  <tr>
    <th colspan="9">Section</th>
  </tr>
  <tr>
    <td>value</td>
    <td>value</td>
    <td>value</td>
    <td>value</td>
    <td>value</td>
    <td>value</td>
    <td>value</td>
    <td>value</td>
    <td>value</td>
  </tr>
  <tr>
    <th colspan="9">Subsection</th>
  </tr>
  <tr>
    <td>value</td>
    <td>value</td>
    <td>value</td>
    <td>value</td>
    <td>value</td>
    <td>value</td>
    <td>value</td>
    <td>value</td>
    <td>value</td>
  </tr>
</table>

</body>
</html>
Now I get this error:
Traceback (most recent call last):
  File "/home/aesfur/workspace/osla-api/src/apps/building/__init__.py", line 27, in <module>
    tablepyxl.document_to_xl(table, 'data.xlsx')
  File "/home/aesfur/workspace/venv/osla/lib/python3.6/site-packages/tablepyxl/tablepyxl.py", line 96, in document_to_xl
    wb = document_to_workbook(doc, base_url=base_url)
  File "/home/aesfur/workspace/venv/osla/lib/python3.6/site-packages/tablepyxl/tablepyxl.py", line 86, in document_to_workbook
    table_to_sheet(table, wb)
  File "/home/aesfur/workspace/venv/osla/lib/python3.6/site-packages/tablepyxl/tablepyxl.py", line 68, in table_to_sheet
    insert_table(table, ws, 1, 1)
  File "/home/aesfur/workspace/venv/osla/lib/python3.6/site-packages/tablepyxl/tablepyxl.py", line 104, in insert_table
    row = write_rows(worksheet, table.body, row, column)
  File "/home/aesfur/workspace/venv/osla/lib/python3.6/site-packages/tablepyxl/tablepyxl.py", line 41, in write_rows
    cell.value = table_cell.value
AttributeError: 'MergedCell' object attribute 'value' is read-only

Process finished with exit code 1

openpyxl 3.0.3

Let's resolve this FutureWarning

/site-packages/tablepyxl/style.py:188: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
self.head = TableHead(table.find('thead'), parent=self) if table.find('thead') else None
/site-packages/tablepyxl/style.py:189: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
self.body = TableBody(table.find('tbody') or table, parent=self)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.