Skip to content
+1-888-319-3663

HELP ARTICLE

Archive file cannot be size 0


I’m using SmartConnect 21 and trying to connect to an Excel source file map and running into this error:

An error occurred retrieving the Excel file sheets: Archive file cannot be size 0.

I’ve also seen the same error one other time when the user trying to pull up an existing map where the data source was already created.


Archive file cannot be size 0.

Pressing View Details shows the stack trace and error:

System.IO.FileFormatException: -2146233033 Archive file cannot be size 0.
Stack:{
at MS.Internal.IO.Zip.ZipArchive.OpenOnStream(Stream stream, FileMode mode, FileAccess access, Boolean streaming)
at eOne.SmartConnect.Engine.RoutineHelper.PopulateLookupEditWithExcelSheets(LookUpEdit control, String excelFile, ExcelType excelFileVestion, Boolean throwExceptionsOnParametersNotSet, FtpHelper ftpHelper)
at eOne.SmartConnect.Connectors.Generic.FormExcelDataSource.lookVersion_TextChanged(Object sender, EventArgs e)
at DevExpress.XtraEditors.TextEdit.OnTextChanged(EventArgs e)
at DevExpress.XtraEditors.TextEdit.OnEditValueChanged()
at DevExpress.XtraEditors.PopupBaseEdit.OnEditValueChanged()
at DevExpress.XtraEditors.LookUpEdit.OnEditValueChanged()
at DevExpress.XtraEditors.BaseEdit.OnEditValueChanging(ChangingEventArgs e)
at DevExpress.XtraEditors.LookUpEdit.OnEditValueChanging(ChangingEventArgs e)
at DevExpress.XtraEditors.BaseEdit.set_EditValue(Object value)

at eOne.SmartConnect.Connectors.Generic.FormExcelDataSource.ShowExisting()
at eOne.SmartConnect.Engine.FormHelper.RunMethodWrapped(Action methodDelegate, String action)
}


While the solutions for both these issues appears different, it is essentially for the same reason.

Excel XLSX files are essentially “compressed data source” files meaning that the xlsx file is essentially a “zip” file with compressed data structures in the file.
In order to read that data, I believe that the file has to be extracted (at least temporarily) to be read.
In the first case in the Data Source Setup: Microsoft Excel window, the customer.xlsx Excel file is at the root of the C drive.

While clearly the user was able to drop the file to the root of the “C” drive as in this case, Windows sometimes is protective of applications to be able to write to that same “root” C drive.  In this case, SmartConnect is able to see the files on that drive but using this method to open the file to read the available sheets fails due to not being able to write back to that same root directory.

In the second case where the data source was successfully created but failed when a second user tried to use the map – that path was actually a UNC path and not a “root drive” like the first one (sorry, no screenshot for the path verifying this).  Instead, the user trying to open the existing map had READ permissions to that folder but didn’t have WRITE permissions to that same folder.  Because of the missing permissions, the method call wasn’t able to write back to that folder and we end up with the same error from the SmartConnect side.

The resolution to this was to grant the user trying to run the map READ & WRITE permissions to that network share and resolved the error in SmartConnect.

RECENT POSTS


How to set up automatic payments on eOne's website portal
Downloading older versions of SmartConnect
SmartList Favorite Tracking SmartList Builder Template
SmartList Favorite Tracking History SmartList Builder Template
SmartList Builder GoTo opens to the wrong record

POPULAR POSTS


SSL Security error using OLEDB Connection
This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms
Removed Part: /xl/vbaProject.bin part. (Visual Basic for Applications (VBA))
The server process could not be started because the configured identity is incorrect.
Using WINSCP and a task to upload or download files from an SFTP site

CATEGORIES

TAGS

Business Central CRM D365 Business Central Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News error Error Message Events Excel Excel Report Builder Extender Flexicoder GP integration Map Microsoft dynamics crm Microsoft Dynamics GP Navigation List Builder Office Relationships Partner All Hands Call Popdock promotions release SalesForce SalesForce.com SmartConnect SmartConnect.com SmartConnect Bootcamp SmartConnect Maps SmartConnect Office Hours SmartList SmartList Builder SmartPost SmartView SQL Tech Tuesday Templates training Zendesk

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.