XLSX

Python / Excel : Turn off Office Excel Compatibility Checker Programmatically

旧时模样 提交于 2019-12-13 16:42:07
问题 A file which has data I need to access is being generated in xlsx format yet I need it to be in xls format for my purpose. I'm able to use win32com.client to open the file however the save cannot fully complete due to Compatibility Checker dialog pop up which notifies you of loss of formatting/features by going from a xlsx --> xls format. Here's the code which currently doesn't allow me to save the file as execution hangs waiting for the dialog to close, any help would be much appreciated:

Excel to PDF without office

纵然是瞬间 提交于 2019-12-13 14:25:15
问题 I need to generate PDF reports in a windows application I'm working on, and I do this by exporting an .xlsx file to pdf. I'm currently using interop for this, however: I need to do this without requiring the users to buy software, so no microsoft office excel. I also can't use any heavy dependencies (like open/libre office). the application is in .NET winforms and is local (not dependent on an internet connection). Things I tried: I have tried iTextSharp but this gets really complicated with

C#. xlsx date cell import to DataTable by NPOI 2.0

十年热恋 提交于 2019-12-13 13:22:46
问题 I'm tried to convert .xlsx file to DataTable format by using NPOI 2.0 library. It's OK, but I have a problem with convert to string date cell. When I try to use construction like row.GetCell(j).ToString() - it's threw exception "Cannot get numeric value from a text cell". I tried to use DateCellValue property, but it also threw this exception. With other cell formats it's work good. Function, that I use it's: private DataTable xlsxToDT(string fileName) { DataTable table = new DataTable();

Read / Write different Microsoft Office file formats using Apache POI

断了今生、忘了曾经 提交于 2019-12-13 09:33:47
问题 How to perform different functions on Microsoft Excel spreadsheet using Apache POI ? I'm trying to generate and update an Excel file ( data from DB ) from my Spring MVC App.. Thanks 回答1: Include apache poi jar file <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.15</version> </dependency> To read an excel file import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; //.. FileInputStream file = new FileInputStream

Editing an open document with python

蓝咒 提交于 2019-12-13 07:43:40
问题 Is it possible to add or remove entries to an excel file or a text file while it is still open (viewing live update of values from python output) instead of seeing the output in terminal? 回答1: It depends on the application you are using to view the file. You will have to check the features available in the tools you are using. For instance, in Excel, this is impossible. When you open an Excel document, it actually creates an invisible copy. You are not editing the original. It is only when

sql bcp utility -in with xlsx ( Excel ) file

霸气de小男生 提交于 2019-12-13 05:00:14
问题 How to use bcp utility to import data from xlsx to sql database. When i tried to import it throws error saying 'String data, right truncation'. Do i need to specify any format or delimiters option explicitly? If I try to export the data from database as xlsx file and import that back to DB it works fine. but the exported file is not properly formatted as i try to open it with office excel it show up in some weird format. 回答1: Don't use the xlsx file as it is, but save it in another format.

How to export Excel file from Angular Material 5 Mat-Table (Angular Material Table)?

给你一囗甜甜゛ 提交于 2019-12-13 04:23:02
问题 I am new to Angular and using Angular material 5 mat-table and trying to export the table in a excel file. I have use SheetJS XLSX package. Below is my code: Table.component.html: <mat-table #table [dataSource]="dataSource" matSort> <!-- ID Column --> <!--<ng-container matColumnDef="ID"> <mat-header-cell *matHeaderCellDef mat-sort-header> UserID </mat-header-cell> <mat-cell *matCellDef="let row"> {{row.UserID}} </mat-cell> </ng-container>--> <!-- Progress Column --> <ng-container matColumnDef

How to export multiple data frames to same xlsx file with R?

可紊 提交于 2019-12-13 03:14:49
问题 Can somebody help me on how to export multiple data frames to the same xlsx-file in R? I know how to do it excel, but getting an out of memory error after exporting few files. So I do not want to touch excel. 回答1: write.table(df1, "test.csv", row.names = F) write.table(df2, "test.csv", append = T, col.names = F, row.names = F) EDIT: To write to two different sheets in an xlsx-file: library(openxlsx) wb <- createWorkbook() addWorksheet(wb, "Sheet 1") addWorksheet(wb, "Sheet 2") writeData(wb, 1

Date formatted cell in xlsx files to R

你说的曾经没有我的故事 提交于 2019-12-13 03:12:55
问题 I have an excel file which has date information in some cells. like : I read this file into R by the following command : library(xlsx) data.files = list.files(pattern = "*.xlsx") data <- lapply(data.files, function(x) read.xlsx(x, sheetIndex = 9,header = T)) Everything is correct except the cells with date! instead of having the xlsx information into those cell, I always have 42948 as a date : Does anybody know how could I fix this ? 回答1: As you can see, after importing your files, dates are

Reading horizontal (row-based) data from xlsx files into R data frames

我的梦境 提交于 2019-12-13 02:26:58
问题 This is a "let's try another way" post that is related to this one: Is it possible to define/modify a reading function that can handle the fact that data stored in an xlsx file is row-based (i.e. each row represents a variable) and transforms it accordingly so it can be stored in a column-based data.frame (i.e. what used to be a row in xlsx becomes a column ) while capturing the underlying class/data type of the row-based variables ? Regarding csv files I would probably start with turning to