Latest Questions tagged Excel

Browse all latest questions tagged Excel

34
Votes
Published 30 Oct, 2022
Java - Generate a excel using java and create a macro in the excel

I have a java code that takes data from MongoDB and later creates an excel(.xls) containing this data using Apache POI but in a formatted manner. My final requirement is to mail the last worksheet i...

1
Votes
Published 24 Apr, 2022
Python - How can I find the last non-empty row of excel using openpyxl 3.03?

How can I find the number of the last non-empty row of an whole xlsx sheet using python and openpyxl? The file can have empty rows between the cells and the empty rows at the end could have had conte...

60
Votes
Published 26 Jun, 2022
Python - Python: How to create multi line cells in excel when exporting a pandas dataframe

I have the following pandas Dataframe df = pd.DataFrame([ [['First Line', 'Second line']], [['First line', 'second line', 'third line']], [['first line']] ]) I am trying to export it into...

75
Votes
Published 07 Sep, 2022
Java - Apache-POI sorting rows in excel

I'd like to sort rows in a sheet by one of string column. I tried to achive that using Sheet.shiftRows method, but I cannot manage with that. It doesn't switch positions of rows in my method. What's w...

48
Votes
Published 21 Aug, 2022
Java - Change colors of line chart Apache POI

I've generated a line chart using Apache POI. I need to change the default colors I got in the chart. Can I use RGB codes to define specific colors to each line? My code is as follows. Drawing dra...

25
Votes
Published 26 Jun, 2022
Python - How can I see the formulas of an excel spreadsheet in pandas / python?

I would like to read in an excel spreadsheet to python / pandas, but have the formulae instead of the cell results. For example, if cell A1 is 25, and cell B1 is =A1, I would like my dataframe to sho...

77
Votes
Published 04 Sep, 2022
Java - NoClassDefFoundError: UnsupportedFileFormatException while using apache poi to write to an excel file

I am trying to write to an excel(.xlsx) file using Apache poi, I included the apache poi dependencies in my pom.xml file. But I am getting the following exception in execution. Exception in thread "m...

20
Votes
Published 12 Aug, 2022
Python - Put Pandas Data Frame to Existing Excel sheet

Is there any way to put data frame into existing Excel sheet. I have a Data Frame that I need to copy into specific Excel sheet to specific location in the sheet, to cell A2, so it will mirror(paste)...

30
Votes
Published 07 Sep, 2022
Java - Issue with poi jar file java.lang.NoSuchMethodError

I am using poi-3.7.jar in my application while i am generating an excel file i am getting the below exception. and i have excluded all the poi jars from my project. could any one help me on this?? j...

25
Votes
Published 07 Sep, 2022
Java - Spring Batch - how to generate Output file of a batch job as excel sheet

I have a simple spring batch program which reads data from a INPUT file and writes to OUTPUT file. Input file is having 50000 records and my chunk size is 1000. There are five columns in the input f...

8
Votes
Published 01 May, 2022
Python - Drop_duplicates not working in pandas?

The purpose of my code is to import 2 Excel files, compare them, and print out the differences to a new Excel file. However, after concatenating all the data, and using the drop_duplicates function,...

47
Votes
Published 19 Oct, 2022
Java - Error when reading values from excel files using Apache POI 4.1.1

I am attempting to read values from an excel file using Apache POI and I am encountering the following error message: org.apache.poi.ooxml.POIXMLException: org.apache.xmlbeans.XmlOptions.setEntityExp...

67
Votes
Published 14 Sep, 2022
Java - Merging cells in Excel using Apache POI

Is there any other way to merge cells in Excel using Apache POI library? I was trying using the following, but its not working // selecting the region in Worksheet for merging data CellRangeAddress...

22
Votes
Published 25 Aug, 2022
Python - How to write an data array to excel in a row instead of in a column using pandas in Python

a= [1,2,3,4,5] df=DataFrame(a) .... #setup excelwriter and dataframe df.to_excel(writer, sheet_name=sheetname,startrow=1, startcol=1, header=False, index=False) Output: 1\n 2\n 3\n 4\n 5 How c...

22
Votes
Published 25 Aug, 2022
Python - pandas, python, excel, search for substring in column of df 1 to write string to column in df2

I am using the package pandas in python to work with and read and write to excel spreadsheets. I have created 2 different dataframes (df1 and df2) that have cells that are all of the data type string....