Error in power query

Copper Contributor

Hello all,

 

When I am updating my excel file I am having this error:

 

Jpmr_94_0-1639477588464.png

 

Do you know how to fix this?

 

This happens when I update my data.

 

"

Feedback Type:
Frown (Error)

Error Message:
[DataFormat.Error] Não foi possível reconhecer a entrada como um documento válido do Excel.

Stack Trace:

Server stack trace:


Exception rethrown at [0]:
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em Microsoft.Mashup.OleDbProvider.DataHost.BufferingMashupEvaluator.BufferingMashupEvaluation.GetBufferedReaderSource(AsyncResult`1 result)
em Microsoft.Mashup.OleDbProvider.DataHost.BufferingMashupEvaluator.BufferingMashupEvaluation.OnEvaluationComplete(AsyncResult`1 result)

Exception rethrown at [1]:
em System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
em Microsoft.Mashup.OleDbProvider.MashupCommandEvaluation.get_PageReader()
em Microsoft.Mashup.OleDbProvider.MashupRowset.get__Rowset()
em Microsoft.Mashup.OleDbProvider.MashupRowset.get_ColumnsInfo()
em Microsoft.OleDb.Rowset.Microsoft.OleDb.IColumnsInfo.GetColumnInfo(DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)
em Microsoft.Mashup.OleDbProvider.TracingRowset.Microsoft.OleDb.IColumnsInfo.GetColumnInfo(DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)

Stack Trace Message:
[DataFormat.Error] Não foi possível reconhecer a entrada como um documento válido do Excel.

Invocation Stack Trace:
em Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo..ctor(String message, Exception exception, Nullable`1 stackTraceInfo, String messageDetail)
em Microsoft.Mashup.Client.UI.Windows.UIHost.RaiseErrorDialog(IWindowHandle activeWindow, FeedbackPackageInfo feedbackPackageInfo, Exception e, LocalizedString dialogTitle, LocalizedString dialogMessage, Boolean useGDICapture)
em Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
em Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass15_0.<HandleException>b__0()
em Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
em Microsoft.Mashup.Client.Excel.OleDbProvider.ExcelMashupClassFactory.TraceAndReportException(String method, Exception exception)
em Microsoft.Mashup.OleDbProvider.TracingRowset.Microsoft.OleDb.IColumnsInfo.GetColumnInfo(DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)
em Microsoft.OleDb.PInvokeInterop.ColumnsInfoTypeInfo.GetColumnInfo(IntPtr objHandle, DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)


InnerException0.Stack Trace Message:
[DataFormat.Error] Não foi possível reconhecer a entrada como um documento válido do Excel.

InnerException0.Stack Trace:
em Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.RemoteEvaluation`1.TryCompleteWithException(Exception exception)
em Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.RemoteEvaluation.Evaluate(Boolean enableFirewall)
em Microsoft.Mashup.Evaluator.EvaluatorThreadPool.EvaluatorThread(Object state)
em Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass9_0.<CreateAction>b__0(Object o)
em System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
em System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
em System.Threading.ThreadHelper.ThreadStart(Object obj)

InnerException0.Invocation Stack Trace:
em Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromException(Exception e, String prefix)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromInnerExceptions(Exception e, Int32 depth)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.CreateAdditionalErrorInfo(Exception e)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo..ctor(String message, Exception exception, Nullable`1 stackTraceInfo, String messageDetail)
em Microsoft.Mashup.Client.UI.Windows.UIHost.RaiseErrorDialog(IWindowHandle activeWindow, FeedbackPackageInfo feedbackPackageInfo, Exception e, LocalizedString dialogTitle, LocalizedString dialogMessage, Boolean useGDICapture)
em Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
em Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass15_0.<HandleException>b__0()
em Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
em Microsoft.Mashup.Client.Excel.OleDbProvider.ExcelMashupClassFactory.TraceAndReportException(String method, Exception exception)
em Microsoft.Mashup.OleDbProvider.TracingRowset.Microsoft.OleDb.IColumnsInfo.GetColumnInfo(DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)
em Microsoft.OleDb.PInvokeInterop.ColumnsInfoTypeInfo.GetColumnInfo(IntPtr objHandle, DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)


InnerException1.Stack Trace Message:
[DataFormat.Error] Não foi possível reconhecer a entrada como um documento válido do Excel.

InnerException1.Stack Trace:
em Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)
em Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
em Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
em Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
em Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
em Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel)
em Microsoft.Mashup.Evaluator.MessageBasedInputStream.ReadNextChunkAndCheckIfClosed()
em Microsoft.Mashup.Evaluator.MessageBasedInputStream.ReadNextChunk()
em Microsoft.Mashup.Common.ChunkedInputStream.Read(Byte[] buffer, Int32 offset, Int32 count)
em System.IO.BinaryReader.FillBuffer(Int32 numBytes)
em System.IO.BinaryReader.ReadInt32()
em Microsoft.Mashup.Evaluator.ITableSourceSerializationExtensions.ReadITableSource(BinaryReader reader)
em Microsoft.Mashup.Evaluator.RemotePageReader.CreatePageReader(OwnedStream stream)
em Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.DataReaderSourceRemoteEvaluation.GetResult(Boolean enableFirewall)
em Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.RemoteEvaluation.Evaluate(Boolean enableFirewall)

InnerException1.Invocation Stack Trace:
em Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromException(Exception e, String prefix)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromInnerExceptions(Exception e, Int32 depth)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromInnerExceptions(Exception e, Int32 depth)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.CreateAdditionalErrorInfo(Exception e)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo..ctor(String message, Exception exception, Nullable`1 stackTraceInfo, String messageDetail)
em Microsoft.Mashup.Client.UI.Windows.UIHost.RaiseErrorDialog(IWindowHandle activeWindow, FeedbackPackageInfo feedbackPackageInfo, Exception e, LocalizedString dialogTitle, LocalizedString dialogMessage, Boolean useGDICapture)
em Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
em Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass15_0.<HandleException>b__0()
em Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
em Microsoft.Mashup.Client.Excel.OleDbProvider.ExcelMashupClassFactory.TraceAndReportException(String method, Exception exception)
em Microsoft.Mashup.OleDbProvider.TracingRowset.Microsoft.OleDb.IColumnsInfo.GetColumnInfo(DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)
em Microsoft.OleDb.PInvokeInterop.ColumnsInfoTypeInfo.GetColumnInfo(IntPtr objHandle, DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)


InnerException2.Stack Trace Message:
O valor especificado tem caracteres CRLF inválidos.
Nome do parâmetro: value

InnerException2.Stack Trace:
em System.Net.WebHeaderCollection.CheckBadChars(String name, Boolean isHeaderValue)
em System.Net.WebHeaderCollection.Set(String name, String value)
em System.Net.WebHeaderCollection.set_Item(HttpRequestHeader header, String value)
em Microsoft.Mashup.Engine1.Library.Http.HttpResourceCredentialDispatcher.WebRequestCredentialDispatcher.Apply(OAuthCredential credential)
em Microsoft.Mashup.Engine1.Library.Http.HttpServices.ApplyCredentials(MashupHttpWebRequest httpRequest, String resourceKind, Uri requestUri, ResourceCredentialCollection credentials, IEngineHost hostEnvironment, String oAuthResource)
em Microsoft.Mashup.Engine1.Library.Web.HttpRequest.ApplyCredentialsToRequest(WebRequest webRequest, ResourceCredentialCollection credentials)
em Microsoft.Mashup.Engine1.Library.Web.Request.CreateWebRequest(Uri uri, ResourceCredentialCollection credentials)
em Microsoft.Mashup.Engine1.Library.Web.Request.CreateResponse(ResourceCredentialCollection credentials)
em Microsoft.Mashup.Engine1.Library.Web.Request.GetResponseCore(ResourceCredentialCollection credentials)
em Microsoft.Mashup.Engine1.Library.Common.RetryPolicy.Execute[TResult](IEngineHost host, Func`1 func)
em Microsoft.Mashup.Engine1.Library.Web.Request.GetResponse(ResourceCredentialCollection credentials, RetryPolicy retryPolicy, SecurityExceptionCreator securityExceptionCreator, Boolean tokenRefreshed)
em Microsoft.Mashup.Engine1.Library.Web.WebContentsBinaryValue.GetResponse(Request request)
em Microsoft.Mashup.Engine1.Library.Web.WebContentsBinaryValue.Open()
em Microsoft.Mashup.Engine1.Library.Common.SeekableBinaryValue.Open()
em Microsoft.Mashup.Engine1.Library.Excel.ExcelFile.<>c__DisplayClass22_0.<Open>b__0()
em Microsoft.Mashup.Engine1.Library.Excel.ExcelFile.EnsureNotHtmlResponse(Func`1 streamCtor)
em Microsoft.Mashup.Engine1.Library.Excel.ExcelFile.Open(String& contentKey)
em Microsoft.Mashup.Engine1.Library.Excel.ExcelReaderOpenXml.ReadTablesUnguarded()
em Microsoft.Mashup.Engine1.Library.Excel.ExcelReaderOpenXml.ReadTables()

InnerException2.Invocation Stack Trace:
em Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromException(Exception e, String prefix)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromInnerExceptions(Exception e, Int32 depth)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromInnerExceptions(Exception e, Int32 depth)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromInnerExceptions(Exception e, Int32 depth)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.CreateAdditionalErrorInfo(Exception e)
em Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo..ctor(String message, Exception exception, Nullable`1 stackTraceInfo, String messageDetail)
em Microsoft.Mashup.Client.UI.Windows.UIHost.RaiseErrorDialog(IWindowHandle activeWindow, FeedbackPackageInfo feedbackPackageInfo, Exception e, LocalizedString dialogTitle, LocalizedString dialogMessage, Boolean useGDICapture)
em Microsoft.Mashup.Client.Excel.Native.NativeUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
em Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass15_0.<HandleException>b__0()
em Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
em Microsoft.Mashup.Client.Excel.OleDbProvider.ExcelMashupClassFactory.TraceAndReportException(String method, Exception exception)
em Microsoft.Mashup.OleDbProvider.TracingRowset.Microsoft.OleDb.IColumnsInfo.GetColumnInfo(DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)
em Microsoft.OleDb.PInvokeInterop.ColumnsInfoTypeInfo.GetColumnInfo(IntPtr objHandle, DBORDINAL& countColumnInfos, DBCOLUMNINFO*& nativeColumnInfos, Char*& nativeStrings)


Supports Premium Content:
False

Formulas:


section Section1;

shared Secador_BD = let
Source = Excel.Workbook(Web.Contents("https://grupomota-my.sharepoint.com/personal/diogo_serra_mota-sc_com/Documents/MMI/MMI%20-%20Produ%C..."), null, true),
Secador_BD_Sheet = Source{[Item="Secador_BD",Kind="Sheet"]}[Data],
#"Cabeçalhos Promovidos1" = Table.PromoteHeaders(Secador_BD_Sheet, [PromoteAllScalars=true]),
#"Linhas em Branco Removidas" = Table.SelectRows(#"Cabeçalhos Promovidos1", each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null}))),
#"Linhas Inferiores Removidas" = Table.RemoveLastN(#"Linhas em Branco Removidas",2),
#"Personalizado Adicionado" = Table.AddColumn(#"Linhas Inferiores Removidas", "Ano", each Date.Year([Data])),
#"Personalizado Adicionado1" = Table.AddColumn(#"Personalizado Adicionado", "Mês", each Date.Month([Data])),
#"Personalizado Adicionado2" = Table.AddColumn(#"Personalizado Adicionado1", "Semana", each Date.WeekOfYear([Data])),
#"Coluna Intercalada Inserida" = Table.AddColumn(#"Personalizado Adicionado2", "Ano-Mês", each Text.Combine({Text.From([Ano], "pt-PT"), Text.From([Mês], "pt-PT")}, "-"), type text),
#"Coluna Intercalada Inserida1" = Table.AddColumn(#"Coluna Intercalada Inserida", "Ano-Semana", each Text.Combine({Text.From([Ano], "pt-PT"), Text.From([Semana], "pt-PT")}, "-"), type text),
#"Personalizado Adicionado3" = Table.AddColumn(#"Coluna Intercalada Inserida1", "M3 Diário", each [#"M³ Gás Fim"]-[#"M³ Gás Início"]),
#"Tipo Alterado" = Table.TransformColumnTypes(#"Personalizado Adicionado3",{{"M3 Diário", type number}}),
#"Coluna Condicional Adicionada" = Table.AddColumn(#"Tipo Alterado", "Prod-Humida", each if [Humidade] = 25 then 14 else if [Humidade] = 23 then 13 else if [Humidade] = 21 then 12 else "Nada"),
#"Personalizado Adicionado5" = Table.AddColumn(#"Coluna Condicional Adicionada", "Produção (Ton)", each [Total Horas]*[#"Prod-Humida"]),
#"Tipo Alterado1" = Table.TransformColumnTypes(#"Personalizado Adicionado5",{{"Data", type date}, {"Hora inicio", type datetime}, {"Hora fim", type datetime}}),
#"Colunas Removidas" = Table.RemoveColumns(#"Tipo Alterado1",{"Column1", "Column18", "Column19"})
in
#"Colunas Removidas";

"

 

Thank you for your help.

 

Jose

1 Reply

@Jpmr_94 
j'avais le meme probleme...
ma solution adaptée est,  de se deconnecter de mon compte local, et se connecter avec le compte adminitrateur de windows 11, apres son activation par la commande ...net user administrator /active/yes..

et le problème est resolvé..

merci d'essayer cette méthode ,et me faire savoir si ça marche pour vous