Skip to content
Advertisement

Tag: excel

How can turn to only 2?

i have problem with openpyxl. My code is working but i can not figure out for saving value to excel my code is and it prints out what i want to do is i want to save title to B column in excel but i don’t know how to do that Answer this one fix my problem

Python – Output hostname and config

I have a script that runs through a list of hostnames/IPs and outputs to a csv “hostname, output”, in the same cell. I need that the Hostname stays in cell A1, and the Output stays on Cell B1 (and so on – A2 B2 etc) Can you help me? The code is this: Answer I need that the Hostname stays

How to export pandas dataframe with Multi-index columns to Excel with column name in one level unmerged and column name in another level merged?

I have a pandas dataframe df which looks as follows: The columns are Multi-Index consisting of 3 levels. First level has Germany as country. Second level has some indicators, and third level has years. And there are some data in the pandas dataframe. I’d like to export this dataframe to Excel such that I get Germany in each column. Then

How to detect protected cells in Excel file using Python?

Given that an Excel file contains some cells protected with passwords, I want to detect these protected cells to choose whether to include them in the inputs or skip them. I have tried pandas and openpyxl However, the protected cells are read normally like other unprotected cells and could be easily changed. So the question is, how could I detect

workbook save failing, not sure why

I apologize for the length of this. I am a relative Neophyte to Excel VBA and even more junior with Python. I have run into an issue with an error that occasionally occurs in python using OpenPyXl (just trying that for the first time). Background: I have a series of python scripts (12) running and querying an API to gather

Converting a .xlsx date into a normal date

I’ve been using xlrd3 to manage a .xlsx spreadsheet through python. When I’m given the value of the cell the date should be in, it gives me 44295, which should be 09/04/2021. I understand that this is because of the format excel stores dates as, so I’ve been using the xldate_as_datetime function in this way: (i is an interable from

Advertisement