I need to put table head row to each printed page while printing a long data sheet(like this), but I failed to find any related setup in PHPExcel, could anyone faced the same problem help me out?
$objPHPExcel->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1,1);
This worked for me
Related
I have an Excel with several sheets, two of which contain pivot tables based on data from other sheets ("data sheets"). Using the openxlsx package, I'm loading the Excel into R and first removing the data sheets and then creating them again with new data. This works well and the pivots update accordingly.
However, if I apply conditional formatting to the pivots and perform the above process, then I obtain an error message when opening the new updated file (We found a problem with some content in [file]. Do you want us to try to recover as much as we can? [...]). After having done the repair, I get the message:
Repaired Records: Conditional formatting from /xl/pivotTables/pivotTable1.xml part (PivotTable view)
The conditional formatting has been removed after the repair. I have found this page which might be of use to me, but I haven't got their possible solutions to work:
https://github.com/awalker89/openxlsx/issues/387
I have also tried to construct a minimal Excel reproducing this behavior, but while the minimal Excel I produce yields the We found a problem... error, it does keep the conditional formatting once repaired.
Any ideas? Thanks in advance!
I'm trying to load some data using fread. While loading it shows the correct number of records, but when its finished loading, the no. of records are comparatively less.
Surprising it doesn't show any warnings. Please can someone advise? see attached pic
click here
Thanks
One common reason is un-clean data with inappropriat un-ended quotations.
E.g., if you have data like this:
number_column,text_column
1,text data 1
2,"text with single quote here
3,text data 3
EVERYTHING after the single quote will be included in the text_column on the 2nd line. This is actually the correct way to interpret, it's just that your CSV/TSV file is broken.
The easiest solution is to use quote="" as a parameter, but the real solution is to go through your TSV/CSV file and fix all the issues manually, since the interpreter cannot know exactly what you want if the file is broken.
recently I am doing a project related to image recognition. And I am trying to use the MNIST dataset. I have already got some help with how to open the image file of the dataset(using readBin) but was stuck in how to open the label file. I used
to.read.label = file("~/train-labels.idx1-ubyte", "rb")
to get the connection but I dont know what to do next. Thank you for the help!
ok, I have worked it out by myself. It is actually the same idea. Just write a loop to get one number by a single time.
Hi sorry first post here my apologies if I made a mistake.
So I'm fairly new to R and I was given an assignment where I am loading a CSV file into R. When i read.csv the whole file I get a ton of blank spots where values should be. The only info printed out is the N/A in the cells which is actually what I am trying to replace.
So I took a small sample of the file only the first couple rows and the info came up correctly in my read.csv comand. My question is is the layout of the .csv too large to display the original data in my main.csv file?
Also, How would I go about replacing all the N/A and NA's in the file to change them to blank cells or ""
Sorry if i painted my scenario poorly
first make sure that all of you data in the csv file is in GENERAL format!
there should be a title for each of the columns too
if you have an empty cell in your csv file then input a 0 into it
and make sure that around the data you CLEAR ALL the cells around them just incase there is anything funny in them
hope that helps if not then you could send me your file to sgreenaway#vmware.com and i will check it out for you :)
I am trying to load a table to R with some of the column heading start with a number, i.e. 55353, 555xx, abvab, 77agg
I found after loading the files, all the headings that start with a number has a X before it, i.e. changed to X55353, X555xx, abvab, X77agg
What can I do to solve this problem. Please kindly notice that not all column heading are start with a number. What should I do to solve this problem?
Many thanks
Probably your issue will be solved by adding check.names=FALSE to your read.table() call.
For more information see ?read.table