Import csv works but same with xls/xlsx gives parser error
-
- Posts: 370
- Joined: Sat Apr 28, 2018 3:33 am
- Location: India
- Contact:
Import csv works but same with xls/xlsx gives parser error
Standard Import CSV aware process done via admin works but same xls/xlsx gives parser error. Is there any install I have to do to make xls or xlsx import work? CSV with same data works. I tried installing office 365 excel on server but it gave same error. In one of the imports I need to use xls/xlsx as excel has locked columns and dropdowns which CSV format can never have(but even xls without dropdowns and locked columns give me same error-Connection failure status:parsererror so there is a basic issue of not able to import xls or xlsx)
Re: Import csv works but same with xls/xlsx gives parser error
I have the same problem! Anyone have an answer to this?
Re: Import csv works but same with xls/xlsx gives parser error
Importing xlsx is not supported.
I am currently trying to make a workaround for Windows Server.
What I am doing so far is using a process like:
1. New form where I upload the xlsx file.
2. Export the file to the server.
3. run a powershell script with EXECUTE PROGRAM that converts it to csv (sorry about the somewhat illogical variable names, this is not finished):
4. import the csv file from the server using a predefined template.
5. profit, hopefully
My progress so far? All of the above steps are actually working for me, as long as the file doesn't have too many rows.
I can give more concrete information with proper AwareIM rules later if you want, but I can't access the BSV right now.
I also recommend having a look inside the database table, because chances are your failed xlsx import messed up the BO, making it impossible to display. Delete the row with messed up data if it exists.
I am currently trying to make a workaround for Windows Server.
What I am doing so far is using a process like:
1. New form where I upload the xlsx file.
2. Export the file to the server.
3. run a powershell script with EXECUTE PROGRAM that converts it to csv (sorry about the somewhat illogical variable names, this is not finished):
Code: Select all
#Install-module PSExcel
Import-module PSExcel
$xlsxFile="HardwareImport.xlsx"
$csvname='C:\acme\'+$xlsxFile.replace('xlsx','csv')
$xlsFilePath='C:\acme\'+$xlsxFile
$rawFile = Import-XLSX -Path $xlsFilePath
$rawFile | Export-Csv $csvname -Encoding UTF8 -NoTypeInformation
5. profit, hopefully
My progress so far? All of the above steps are actually working for me, as long as the file doesn't have too many rows.
I can give more concrete information with proper AwareIM rules later if you want, but I can't access the BSV right now.
I also recommend having a look inside the database table, because chances are your failed xlsx import messed up the BO, making it impossible to display. Delete the row with messed up data if it exists.
Re: Import csv works but same with xls/xlsx gives parser error
An alternative approach to address this issue involves converting the file into a MySql table and utilizing the external database table. This approach enables the importation of intricate Excel files, including multiple sheets. I personally rely on this method for all my data import tasks. Additionally, there is a Command Line Interface (CLI) version available, allowing seamless automation of the process directly within AwareIM. It functions flawlessly.
https://www.excel2mysql.com/index.html
https://www.excel2mysql.com/index.html