XLSX

Python: UnicodeDecodeError using pandas.read_excel

落花浮王杯 提交于 2019-12-11 18:31:38
问题 import pandas as pd msf=pd.read_excel('‪C:\Users\pauldufosse\Documents\TESTDANIEL.xlsx', has_index_names=True) I'm having difficulties importing this xlsx document. I will give you the full traceback as you might help me to find WHERE the wrong byte is. I'm french so there is the character 'à' but I think this one is taken in charge by ascii/utf-8 am i right? runfile('C:/Users/pauldufosse/Documents/MSF.py', wdir='C:/Users/pauldufosse/Documents') Traceback (most recent call last): File "C:

openpyxl basic search

五迷三道 提交于 2019-12-11 18:06:33
问题 I am trying to search an excel document and if the name of the mp3 file is matched in the excel document, It prints out the row the instance of the name is found on. this is what I have: from mutagen.easyid3 import EasyID3 from openpyxl import load_workbook import glob import re import os for name in glob.glob('*.mp3'): audio = EasyID3(name) wb = load_workbook('xl.xlsx') sh = wb.get_sheet_by_name('Russian') for row in sh: if row.value == name: print row.number 回答1: First of all you are

Anomalies adding PNG in xlsx - Apache POI 3.9

百般思念 提交于 2019-12-11 17:44:50
问题 I'm able to add pngs to my xlsx but with a few anomalies: On the last row (only), the image is overlaid on the previous row's image: I suspect the anchoring: int pictureIndex = report.addPicture(curve, XSSFWorkbook.PICTURE_TYPE_PNG); anchor.setCol1(7); **anchor.setRow1(rowNumber-1);** anchor.setCol2(8); anchor.setRow2(rowNumber); drawing.createPicture(anchor, pictureIndex); But if I follow the examples I've seen, anchor.setRow1(rowNumber) then my images don't show at all. Last, is there a way

How to prevent System.IO.Compression.ZipArchive from corrupting XLSX file?

拥有回忆 提交于 2019-12-11 17:12:42
问题 ZipArchive archive = ZipFile.Open("test.xlsx", ZipArchiveMode.Update); archive.Dispose(); This simplest operation turns test.xlsx into corrupted file, so Excel can't open it. Later if I manually extract all files from corrupted test.xlsx and zip them back, file becomes good again for Excel. I need to do some changes in xlsx from my code by unpacking some XMLs and modifying them. How to stop file corruption by ZipArchive? 来源: https://stackoverflow.com/questions/58433045/how-to-prevent-system

R - Importing 'xlsx' package to my own package doesn't work

最后都变了- 提交于 2019-12-11 14:30:00
问题 I am creating my own package. I am using a lot of existing packages in it and they work. I am using the same procedure for the xlsx package but it doesn't work. I have xlsx in Imports: in my DESCRIPTION file. I have @import xlsx in my respective .R file. I also tried @importFrom write.xlsx for a particular function with the same result. I am using libraries devtools and roxygen2 for creating the package. My new package is build, but if I proceed Check , an error occurs: Installation failed.

How to open .xlsx file on UIWebView in iPhone?

烈酒焚心 提交于 2019-12-11 14:17:04
问题 Is it possible to open the .xlsx file on UIWebView . I can't open .xlsx file on UIWebView . I got the following error message when I open the .xlsx file. Unable to Read Document. An error occurred while reading the document. I didn't face any issue when I open remaining file types like .xls, .doc, .txt and .pdf. 回答1: .xlsx cannot be opened in UIWebView, you can use .xls - it will work fine. 回答2: You can open .xlsx [webView loadData:urlData MIMEType:@"application/vnd.openxmlformats

Poi: Saving an excel file as xlsx after opening it from xlsm

不羁岁月 提交于 2019-12-11 07:54:44
问题 I'm writing a java program that opens a user-defined excel file, fills it with data, and then saves it under a user-specified path, file name and extension. It should be, but isn't, possible to declare the output to be saved as xlsx, even though the input file was xlsm. If I try that with the code as below, opening the file gives me the error: The file 'FileName.xlsx' is a macro-free file, but contains macro-enabled content Key segments of code: Opening the workbook: try (Workbook workbook =

Changing a cell value in a xlsl sheet while keeping the format nodejs

孤人 提交于 2019-12-11 05:30:33
问题 Title is what I'm trying to achieve. Basically I want to edit a existing excel sheet that is formatted with fonts/styles etc and keep those fonts/styles intact while changing a particular cells value. I've tried using the xlsx npm module, I've been able to change the cell to the value I want and save the file, but when doing so all the style is lost. I was wondering if you guys could give me any directions on what to try now. I only want to use nodejs for this project. Thanks guys. 回答1: In

How to resolve the Method not found in C#?

ぃ、小莉子 提交于 2019-12-11 05:17:34
问题 I'm trying to read an xlsx file, and I got a basic overview from This Codeproject Link Now, I'm getting the following exception message: The code segment related to this exception is given below: public static sst SharedStrings; /// <summary> /// All worksheets in the Excel workbook deserialized /// </summary> /// <param name="ExcelFileName">Full path and filename of the Excel xlsx-file</param> /// <returns></returns> public static IEnumerable<worksheet> Worksheets(string ExcelFileName) {

Excel::Writer::XLSX set_optimization() only writes numeric data

蓝咒 提交于 2019-12-11 05:13:53
问题 I am using the Excel::Writer::XLSX perl module to export to Excel. It is working great except large exports take a long time. However, when I add $workbook->set_optimization(); I only get numeric data in my .xlsx file. I have tried using both $worksheet->write() and $worksheet->write_string() but any fields that have a string rather than a number are being left out of the export when I use $workbook->set_optimization(); If I use the older Spreadsheet::WriteExcel module it works just fine but