Giter Site home page Giter Site logo

automating_excel_with_python's Introduction

automating_excel_with_python's People

Contributors

driscollis 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  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  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  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  avatar  avatar  avatar  avatar

automating_excel_with_python's Issues

Border doesn't apply when only the top left cell is used in a merged cell

On pages 52-54 (Chap 4), Styling Merged Cells, the border styling is being set on a merged cell range, "A2:G4". The selected cell in the example is the top left cell; 'A2'.

The file "style_merged_cell.py" is the example, when executed, it only applies to the border on cell 'A2'. (this is the same code as provided in the book.)

Here is what is present in the newly created spreadsheet. It's close to the image that is shown in the book, the only difference is A1 is selected in the book so the border is not visible.

image

Instead I, looped over the range applying the border styling to each cell in the merged range and the border was as expected.

    cell_range = "A2:G4"
    for column in sheet[cell_range]:
        for cell in column:
            cell.border = Border(top=double, left=thin, right=thin, bottom=double)

image

How to read cell value if formula is applied on the column?

Hi Mike,
Had a question on reading_specific_cell.py. I have applied formula on custom sales excel data where sales value to copies sold * value of the book.

reading_specific_cells.py has the below output

<Worksheet "sales">
The title of this worksheet is: sales
Value of A5 is: 5
Value of E14 is: A Short History of Nearly Everything
=(C14*D14)

Please suggest if there's a way to read the actual value instead or should cells for the formula be read and multiplied, something like

    print(f'Value of E14 is { sheet["C14"].value * sheet["D14"].value}')

if that's the way, can we identify such columns ahead of starting any operations on them?

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.