How to generate excel2010 with PHPExcel - phpexcel

I am generating excel2017 with phpexcel. i am facing problem with COUNTIFS() function. Is there any way to generate excel2010 with phpexcel?
$writer = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');

There is no such format as Excel2010, that's simply a version of MS Excel. If you want to create an Excel BIFF-format (.xls) file, then you use the Excel5 Writer; if you want to create an OfficeOpenXML (.xlsx) file, then you use the Excel2007 Writer

Related

Read htm file and a table wihtin file in R

I have got some .htm files. Instead there are HTML files including a data sheet.
I know how to process that in python. Using pandas reading html file;
df = pd.read_html("file")[0]
Python read the file as a list and the table is in [0] position.
How can I do that in R ?

How to convert doc to docx file using R code

I tried to read doc file using readdoc() but when doc file consist of tables, it will not able read it properly.
Therefore I want to convert doc file to docx file so that I can extract tables using docxtractr package availabe in R.
I want to convert .doc file to .docx file using R code.

Taking manipulated data out of the R console and creating a csv

I have used R to remove duplicates from a csv file using the following (lda_data is my csv file name)
unique(lda_data[duplicated(lda_data),])
This works great, however I need to get the results from the console into another csv file.
What are the methods of getting manipulated data from a csv file into another new and manipulated csv file?
Thanks in advance.
Use the write.csv command:
write.csv(dataframe, "/path/filename.csv", row.names = FALSE)
That should do the trick for you.

how to write multiple dataframe to multiple sheet of one csv excel file in R?

I am trying to write multiple dataframe to a single csv formated file but each in a different sheet of the excel file:
write.csv(dataframe1, file = "file1.csv",row.names=FALSE)
write.csv(dataframe2, file = "file2.csv",row.names=FALSE)
is there any way to specify the sheet along with the csv file in this code and write them all in one file?
thank you in advance,
This is not possible. That is the functionality of csv to be just in one sheet so that you can view it either from notepad or any other such software. If you still try to write it would get over ridden. Just try to open a csv and open a new sheet and just write some values and save it. The values which were already there is erased. one excel file in csv format can have only one sheet.
The xlsx and XLConnect packages will do the trick as well.

Write pdf files with phpexcel bundle?

How to print a pdf file with phpExcel Bundle.. the documentation show how to write a xls file with the code:
$response->headers->set('Content-Type', 'text/vnd.ms-excel; charset=utf-8');
$response->headers->set('Content-Disposition', 'attachment;filename=stdream2.xls');
This is working, but i don't have idea how to write a pdf file?
Any suggestion?
The new version of https://github.com/liuggio/ExcelBundle
now has pdf and xlsx support.

Resources