I’m working on an program which makes an excel file, then it gets the info into JSON and does more things. I’m struggling with Openpyxl. I found out today that if you don’t open an Excel file made with Openpyxl with Excel, the formulas won’t be computer. So when I write: I don’t get the formulas result, but only a
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 generate multiple file paths and save them into a excel with python
I want to generate hundreds of file paths in python and save them into an excel file. Each path should save in a separate row and paths vary just by one value. I am not sure how to iterate it through a for loop. Here is my try: Output is excel file should be like below: Answer There are a
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 can we create separate excel sheets using python pandas?
For ex: I have one excel file as my input, consisting of 50K records of employees. Employees are working in different companies A,B, and C. How can we filter this input excel file on the basis of companies and create new output Excel file. Which consist of separate sheets For Companies A,B, and C. In output excel file Sheet A
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
Is it possible to read information from an xlsx file without any libraries in python?
I am forced to ask this question My mentor has given me a task to extract data from files with pure python, there were some txt file which were easy but there is a file with xlsx extension and I can’t find any where if it is possible to extract the data from it with pure python (I have been