Generate excel file containing multiple sheets using PhpExcel - phpexcel

I am trying to generate Excel file with multiple worksheets in it, and the file is generating with proper data, but giving error while opening it.
error is as:
Also, when I am trying to iterate over sheets through loop, I unable to access sheets except sheet one.
PHP error occured:
You tried to set a sheet active by the out of bounds index: 1. The actual number of sheets is 1.
Does that means the others sheets are not inserted while creating file.

use ob_clean() before, php://output as (CORRECT):
ob_clean();
$objWriter->save('php://output');
You may using like (WRONG):
$objWriter->save('php://output');
ob_clean();

Related

How to check if excel file with multiple sheets contains macros/formulas in R after importing?

Once I have imported excel file with multiple sheets into R I want to check if excel sheets contains any formulas/VBA/macros into it.
Also I am not sure whether while importing any excel sheets that contains formulas also gets imported along with file in R or it's only importing values because I am not able find it.
Any help would be appreciated!!!

Open CSV data in tableau

I have had problems uploading the following file to Tableau:
https://www.kaggle.com/datasets/shivamb/netflix-shows/download
When loaded it looks like this
but loading it in R
Is it possible to load them in R and then by Rserve connect to tableau or is there a way to load them fine
Looks like a problem within the interpreter.
I can't download the file myself as I don't have a Kaggle account, and its not clear from you R screenshots, though you could adjust the text file properties to see if you can adjust how the interpreter works by right-mouse the object "netflix_titles.csv" in the data model window and selecting Text file properties from the context menu.
Another option would be to try to use the interpreter Usar el intérprete de datos
It looks like Tableau is reading this file as a Text file and not a CSV. Tableau should have multiple headers for every comma that it sees but your screenshot has a single column for the entire first row.
Sometimes, Tableau can correctly read the file if you check the "Use Data Interpreter" checkbox.
If you have trouble making that work, just simply open the CSV in Excel and save it as an XLSX. You could even connect to it via an import to Google Sheets if you don't have Excel.

Getting embedded nul string while reading an excel csv

I'm trying to open an Excel CSV file within R Studio but I get this error:
Error Is this a valid CSV file? embedded nul in the string: 'C\0a\0m\0p\0a\0g\0n\0e\0_\0N\0o\0C\0a\0r\0a\0v\0a\0g\0g\0i\0o\0_\0C\0o\0s\0t\0o\0>\00'
the file is generated automatically by the Google Ads platform as Excel csv and it works normally with Excel but in order to open it on R Studio I have to convert it as .xlsx
is there a way to bypass this or to convert the file without opening it?
otherwise the script which is based upon this file needs a manual passage to convert the source file
What function are you using to open it? Check your file and see if you have other commas within a column value; this may confuse the function. Also, it is worth trying to use the "Import dataset" option in the environment window within Rstudio. Try to use the readr option and adjust your import options until you have it correct. Check the package RAdwords maybe you can extract your Google Ads information without the CSV exporting step.

Missing delimiter error when importing html text

Playing with Azure Machine Learning using the Designer and am getting a "Delimiter not found" error when importing my data.
I originally started with a few hundred html files stored as azure blobs. Each file would be considered a single row of text, however, I had no luck importing these files for further text analytics.
I created a Data Factory job that imported each file, stripped all the tabs, quotes, cr/lf from the text, added a column for the file name and stored it all as a combined tab-delimited file. In notepad++ I can confirm that the format is FileName tab HtmlText. This is the file I'm trying to import into ML and getting the missing delimiter message as I'm trying to define the import module.
Here is the error when I try and create a dataset:
{
"message": "'Delimiter' is not specified or invalid."
}
Question 1: Is there a better way to do text analytics on a large collection of html files?
Question 2: Is there a format I need to use in my combined .tsv file that works?
Question 3: Is there maybe a max length to the string column? My html can be 10's of thousands of characters long.
you're right that it might be line length, but my guess is that there are still some special characters (i.e. anything starting with \ that aren't properly escaped or removed. How did you scrape and strip the text data? Have you tried using beautifulsoup?

R: Error while reading XLS file because of styles

While trying to load XLS file to R
people <- readWorksheetFromFile("/Users/andi/export_exp_11.xls",sheet="people")
I got:
ERROR: IllegalArgumentException (Java): Unable to set user specified style names for built in styles!le
When I openede the file in Excel and selected whole spreadsheet and set style to None it runs ok.
I would like to manipulate programatically this styles before reading it to R? Without using Excel of course. Is it possible?

Resources