Power Query error, HELPPPP

Copper Contributor

Hi, I keep getting this error when trying to close and load a csv and access file to my excel worksheet:

Feedback Type:
Frown (Error)

Error Message:
External component has thrown an exception.

Stack Trace:
at Microsoft.Mashup.ScriptDom.TSql100Parser.Parse(IList`1 tokens, IList`1& errors)
at Microsoft.Mashup.ScriptDom.TSqlParser.Parse(TextReader input, IList`1& errors, Int32 startOffset, Int32 startLine, Int32 startColumn)
at Microsoft.Mashup.SqlTranslator.SqlParser.Parse(String sql)
at Microsoft.Mashup.Host.ProviderShared.MashupFileHost.GetEvaluator(IMashupResourcePackage mashupResourcePackage, Guid dialect, String commandText, Boolean forColumnInfo, IMashupContext mashupContext)
at Microsoft.Mashup.Host.ProviderShared.MashupFileHost.Microsoft.Mashup.OleDbProvider.IMashupDocument.CreateEvaluator(Guid dialect, String commandText, Boolean forColumnInfo)
at Microsoft.Mashup.OleDbProvider.MashupSession.CreateRowset(Guid dialect, String commandText, Boolean forColumnInfo)
at Microsoft.Mashup.OleDbProvider.MashupCommand.CreateRowset(Boolean forColumnInfo)
at Microsoft.Mashup.OleDbProvider.TracingCommand.CreateRowset(Boolean forColumnInfo)

Stack Trace Message:
External component has thrown an exception.

Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
at Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo..ctor(String message, Exception exception, Nullable`1 stackTraceInfo, String messageDetail)
at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.RaiseErrorDialog(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, LocalizedString dialogTitle, LocalizedString dialogMessage, Boolean useGDICapture)
at Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass14_0.<HandleException>b__0()
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.SendAndMarshalExceptions(SynchronizationContext context, Action callback)
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.Mashup.Client.Excel.OleDbProvider.ExcelMashupClassFactory.TraceAndReportException(String method, Exception exception)
at Microsoft.Mashup.OleDbProvider.TracingCommand.CreateRowset(Boolean forColumnInfo)
at Microsoft.OleDb.Command.Microsoft.OleDb.ICommandText.Execute(IntPtr punkOuter, Guid& iid, DBPARAMS* pParams, DBROWCOUNT* pcRowsAffected, IntPtr& ppv)
at Microsoft.OleDb.PInvokeInterop.CommandTextTypeInfo.Execute(IntPtr objHandle, IntPtr pUnkOuter, Guid& iid, DBPARAMS* pParams, DBROWCOUNT* cRowsAffected, IntPtr& ppv)
at Microsoft.Mashup.Client.Excel.NativeExcelFunctionsNetStandard.LoadQuery(IntPtr workbookPointer, MarshalledConnectionInfo[] connectionInfo, Boolean showDialog, NativeFillObjectType defaultFillObjectType, Boolean defaultLoadToDataModel, CommitQueryChangesCallback commitCallback, DiscardQueryChangesCallback discardCallback)
at Microsoft.Mashup.Client.Excel.Fill.PassiveFillManager.NotifyExcelOnQueryLoading(IWorkbookIdentity workbookIdentity, IEnumerable`1 addedQueries, Boolean promptForLoadOptions, FillObjectType defaultsFillObjectType, Boolean defaultAddToDataModel, CommitQueryChangesCallback commitCallback, DiscardQueryChangesCallback discardCallback)
at Microsoft.Mashup.Client.Excel.Fill.PassiveFillManager.<>c__DisplayClass3_0.<TryInitializeLoadFlow>b__2()
at Microsoft.Mashup.Client.Excel.Shim.NativeRefreshCachingServices.InvokeWithRefreshSession(IWorkbook workbook, Action action)
at Microsoft.Mashup.Client.Excel.Fill.PassiveFillManager.TryInitializeLoadFlow(IWindowHandle ownerWindow, IWorkbookIdentity workbookIdentity, Queries queries, QueriesDiffs queriesDiffs, InitialFillTargets defaultFillTargets, QueriesCommitPoint queriesCommitPoint, IQueryServices queryServices, Action onFillStarted, Boolean promptForLoadOptions, Boolean allowExistingWorksheet, Boolean showCancelConfirmation)
at Microsoft.Mashup.Client.Excel.QueriesEditorWindowManager.ShowModalQueriesEditorWindow(IWindowHandle ownerWindow, IWorkbookIdentity workbookIdentity, QueriesEditorParameters queriesEditorParameters, Queries queries, IUndoScope undoScope)
at Microsoft.Mashup.Client.Excel.QueriesEditorWindowManager.<>c__DisplayClass12_1.<ShowModalQueriesEditorWindow>b__1(IUndoScope undoScope)
at Microsoft.Mashup.Client.Excel.Shim.NativeUndoServices.<>c__DisplayClass6_0.<InvokeUndoableAction>b__0()
at Microsoft.Mashup.Client.Excel.Shim.NativeWorkbookStorageServices.Microsoft.Mashup.Client.Excel.Shim.IDeferredStorageInvoker.InvokeDeferredStorageAction(IWorkbook workbook, Action action)
at Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.InvokeCoauthAction(IWorkbook workbook, UndoableActionType actionType, Action action)
at Microsoft.Mashup.Client.Excel.Shim.NativeUndoServices.InvokeUndoableAction(IWorkbook workbook, UndoableActionType actionType, Action`1 action)
at Microsoft.Mashup.Client.Excel.QueriesEditorWindowManager.<>c__DisplayClass12_0.<ShowModalQueriesEditorWindow>b__0()
at Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.NotifyGetDataPresence(IWorkbook workbook, Action action)
at Microsoft.Mashup.Client.Excel.QueriesEditorWindowManager.ShowModalQueriesEditorWindow(IWindowHandle ownerWindow, IWorkbookIdentity workbookIdentity, QueriesEditorParameters queriesEditorParameters, Queries queries)
at Microsoft.Mashup.Client.Excel.DialogManager.EditNewQuery(QueriesCommitPoint queriesCommitPoint, Query query, IWindowHandle ownerWindow, IWorkbookIdentity workbookIdentity, JsonUpdate builderResults, Boolean isBlankQuery)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass58_1.<OnImportSuccess>b__0(IUndoScope undoScope)
at Microsoft.Mashup.Client.Excel.Shim.NativeUndoServices.<>c__DisplayClass6_0.<InvokeUndoableAction>b__0()
at Microsoft.Mashup.Client.Excel.Shim.NativeWorkbookStorageServices.Microsoft.Mashup.Client.Excel.Shim.IDeferredStorageInvoker.InvokeDeferredStorageAction(IWorkbook workbook, Action action)
at Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.InvokeCoauthAction(IWorkbook workbook, UndoableActionType actionType, Action action)
at Microsoft.Mashup.Client.Excel.Shim.NativeUndoServices.InvokeUndoableAction(IWorkbook workbook, UndoableActionType actionType, Action`1 action)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.OnImportSuccess(IEnumerable`1 importedQueries, DataImportDestination destination)
at Microsoft.Mashup.Client.UI.Shared.DataImporter.ProcessImportedQueries(IEnumerable`1 importedQueries, DataImportDestination destination)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.OnTablePreviewDialogAction(Query query, TablePreviewDialogAction dialogAction)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass54_0.<ImportTextSource>b__0(IWorkbook workbook)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass55_1.<NotifyGetDataPresence>b__1()
at Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.NotifyGetDataPresence(IWorkbook workbook, Action action)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass55_0.<NotifyGetDataPresence>b__0(IWorkbook workbook)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass56_0.<InvokeOnWorkbook>b__0(IWorkbook workbook, IWindowContext windowContext)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.InvokeOnWorkbook[T](Func`3 action, T defaultValue)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.InvokeOnWorkbook(Action`1 action)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.NotifyGetDataPresence(Action`1 action)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.ImportTextSource(Query query, PreviewResult previewResult, String formulaTitle)
at Microsoft.Mashup.Client.UI.Shared.DataImporter.OnGetPreviewResult(PreviewResult preview, Query query, String sourceID, String formulaTitle, Nullable`1 explicitImportDestination, Boolean isNewQuery, Boolean isFromEditor)
at Microsoft.Mashup.Client.UI.Shared.DataImporter.GetPreviewResult(Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor, Nullable`1 explicitImportDestination)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass62_0.<GetPreviewResult>b__1()
at Microsoft.Mashup.Client.Excel.Shim.NativeWorkbookStorageServices.Microsoft.Mashup.Client.Excel.Shim.IDeferredStorageInvoker.InvokeDeferredStorageAction(IWorkbook workbook, Action action)
at Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.InvokeCoauthAction(IWorkbook workbook, UndoableActionType actionType, Action action)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass62_0.<GetPreviewResult>b__0(IWorkbook workbook)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass55_1.<NotifyGetDataPresence>b__1()
at Microsoft.Mashup.Client.Excel.Shim.NativeCoAuthServices.NotifyGetDataPresence(IWorkbook workbook, Action action)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass55_0.<NotifyGetDataPresence>b__0(IWorkbook workbook)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.<>c__DisplayClass56_0.<InvokeOnWorkbook>b__0(IWorkbook workbook, IWindowContext windowContext)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.InvokeOnWorkbook[T](Func`3 action, T defaultValue)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.InvokeOnWorkbook(Action`1 action)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.NotifyGetDataPresence(Action`1 action)
at Microsoft.Mashup.Client.Excel.ExcelDataImporter.GetPreviewResult(Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor, Nullable`1 explicitImportDestination)
at Microsoft.Mashup.Client.UI.Shared.DataImporter.<>c__DisplayClass78_1.<OnQuerySettingsResolved>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass3_0.<Post>b__0(Object null)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Error Code:
-2147467259 (0x80004005)

Supports Premium Content:
True

Formulas:


section Section1;

shared #"revenue history" = let
Source = Csv.Document(File.Contents("C:\Users\O\Downloads\Support _history.csv"),[Delimiter=",", Columns=5, Encoding=65001, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Year", Int64.Type}, {"Business Year", Int64.Type}, {"Revenue ($mil)", type number}, {"Units Sold", Int64.Type}, {"Notes", type text}})
in
#"Changed Type";

 

 

Ive tried restarting, copy/paste. Not sure what to do and I have to fix this in order to complete my school assignment. 

I've recently downloaded Sims 4 onto my laptop. Could that be a reason for this error message or are the 2 not correlated?

 

Thank you, stay safe

2 Replies

@k_striick I would focus on one program at a time. So maybe start with CSV file. Are you trying to import a data set once or is this a spreadsheet that will continue to pull in info from an updated CSV file?

 

A bit more information on how you are building your excel file would be helpful. 

Pretty easy to go into excel, Data and import data from a CSV file.  

Hello, I figured it out. I had to repair my Microsot Office.