VSTO excel addin not working in excel 2013 after installing powerquery
I am using VSTO in my project with WPF. This is working fine in Excel. But when I install power query in excel2013,my VSTO AddIn is not working. When I disable power query ,my AddIn will work fine.
Need solution for the above issue. Thanks in advance
1 answer
-
answered 2022-05-04 12:23
Eugene Astafiev
Check if you have got exceptions in the add-in's code at runtime. That is a possible reason for disabling the add-in. Try to enable logging for your add-in, see Event logging for Office solutions for more information.
Also I'd suggest creating your own log file so, you could analyze it and find the cause at any point.
do you know?
how many words do you know
See also questions close to this topic
-
C# - Adding condition to func results in stack overflow exception
I have a func as part of specification class which sorts the given iqueryable
Func<IQueryable<T>, IOrderedQueryable<T>>? Sort { get; set; }
When i add more than one condition to the func like below , it results in stack overflow exception.
spec.OrderBy(sc => sc.Case.EndTime).OrderBy(sc => sc.Case.StartTime);
The OrderBy method is implemented like this
public ISpecification<T> OrderBy<TProperty>(Expression<Func<T, TProperty>> property) { _ = Sort == null ? Sort = items => items.OrderBy(property) : Sort = items => Sort(items).ThenBy(property); return this; }
Chaining or using separate lines doesn't make a difference.
This problem gets resolved if I assign a new instance of the specification and set it's func, but i don't want to be assigning to a new instance everytime. Please suggest what am i missing here and how to reuse the same instance (if possible).
-
How to projection fields for a dictionary (C#, MongdoDB)
I am trying my luck here, I have a model which is like the following
public class RowData : BaseBsonDefinition { . [BsonExtraElements] [BsonDictionaryOptions(DictionaryRepresentation.ArrayOfDocuments)] public Dictionary<string, object> Rows { get; set; } = new(StringComparer.OrdinalIgnoreCase); . }
In result, the schema in the MongoDB looks like
{ "_id": { "$binary": { "base64": "HiuI1sgyT0OZmcgGUit2dw==", "subType": "03" } }, "c1": "AAA", "c8": "Fully Vac", "c10": "", }
Those c1, c8 and c10 fields are keys from the dictionary, my question is how to dynamic project those fields?
I tried
Builders<RowData>.Projection.Exclude(p => "c1")
It seems the MongoDB driver can not handle a value directly.
Anyone could point me in the correct direction?
Thanks,
-
How do I add new DataSource to an already Databinded CheckBoxList
i'm building a web form that show Database's item(Tables, Rows, FK,...)
I have a CheckBoxList of Tables (
chkListTable
) which will show a new CheckBoxList of Rows (chkListRow
) everytime I SelectedIndexChanged fromchkListTable
. The problem is i can show the items fromchkListTable
with 1 selected item. But i don't know how to showchkListRow
if multiple item fromchkListTable
are selected.Here are my codes:
aspx
:<div> <asp:Label ID="Label2" runat="server" Text="Table: "></asp:Label> <asp:CheckBoxList ID="chkListTable" runat="server" DataTextField="name" DataValueFeild="name" AutoPostBack="true" OnSelectedIndexChanged="chkListTable_SelectedIndexChanged"> </asp:CheckBoxList> </div> <div> <asp:CheckBoxList ID="chkListRow" runat="server" DataTextField="COLUMN_NAME" DataValueField="COLUMN_NAME" RepeatDirection="Horizontal"> </asp:CheckBoxList> </div>
aspx.cs
:protected void chkListTable_SelectedIndexChanged(object sender, EventArgs e) { tableName.Clear(); foreach (ListItem item in chkListTable.Items) { if(item.Selected) { tableName.Add(item.Text.Trim()); } } for(int i = 0; i < tableName.Count; i++) { String query = "USE " + dbname + " SELECT * FROM information_schema.columns" + " WHERE table_name = '" + tableName[i] + "'" + " AND COLUMN_NAME != 'rowguid'"; chkListRow.DataSource = Program.ExecSqlDataReader(query); chkListRow.DataBind(); Program.conn.Close(); } }
Program.cs
:public static bool Connect() { if (Program.conn != null && Program.conn.State == ConnectionState.Open) Program.conn.Close(); try { Program.conn.ConnectionString = Program.constr; Program.conn.Open(); return true; } catch (Exception e) { return false; } } public static SqlDataReader ExecSqlDataReader(String query) { SqlDataReader myreader; SqlCommand sqlcmd = new SqlCommand(query, Program.conn); sqlcmd.CommandType = CommandType.Text; if (Program.conn.State == ConnectionState.Closed) Program.conn.Open(); try { myreader = sqlcmd.ExecuteReader(); return myreader; myreader.Close(); } catch (SqlException ex) { Program.conn.Close(); return null; } }
I want my display to be like this:
[x]Table1 [x]Table2 [ ]Table3 [ ]Row1(Table1) [ ]Row2(Table1) [ ]Row3(Table1) [ ]Row1(Table2) [ ]Row2(Table2)
- Outlook VSTO - Get all items in a group calendar
-
Outlook VSTO - Allow specific AD group to see ribbon
How can I programmatically restrict the VSTO Add-in Ribbon visibility to a specific AD group only? Can this be controlled directly from the Ribbon XML itself? The plugin is distributed to entire org, but need the ribbon visibility to change by AD group
-
VSTO fatal error System.Runtime.InteropServices.COMException: 'Exception from HRESULT: 0x800A03EC'
I have used Imports Microsoft.Office.Interop and Reference of Microsoft excel is added to project/solution
Following are declaration
Public xlsfilepath As String Public oxlsapp As New Excel.Application Public oxlsworkbook As Excel.Workbook Public oxlsworksheet As Excel.Worksheet Public oxlcellsrange As Excel.Range Dim xchar As String
Cell reading process from existing file
oxlcellsrange = oxlsworksheet.Cells(iRow, iCol) MessageBox.Show(oxlsworksheet.Range(oxlcellsrange).Value)<----Here gives fatal error
System.Runtime.InteropServices.COMException: 'Exception from HRESULT: 0x800A03EC'
Don't understand why?
Image is attached for that describes more.
-
compare two separate data sets
is it possible to compare particular values from a table/report from power bi data set with another table from excel sheet?
In the power bi data set i have the organization data about all employees, and in my excel i have the data for 10 particular individuals. (something like: Name, Grade, Role, Team, Joining Date, Departure Date)
What i now do is to create in power bi the report with just the 10 people, export the data and then i compare that table with my local one, if there are any mismatches, like if the grades changed or they move to another team/department or some thing, in my local file i have some custom/aditional columns that arent in the powerbi dataset (Name, Grade, Role, Team, Joining Date, Departure Date, Comment, Skills, Future team)
i could not load a data set from the excel file, and also from the company powerbi dataset, in the same report/page
-
Format date with dax
I have dates like:
I need to do two transformations:
Convert it into datetime
field date and time in the initial data shows in GMT. Necessary translate into our local time as well as our working hours. Local time = time in Kyiv which also takes into account daylight saving time. Working hours = because we work 24/7, we take into account the beginning of each day not from 00:00, and from 7:25 am. That is, if the purchase was made on February 1 at 7:15, it has enroll until January 31. For the second point I used this function, how to midify it to respond to the requirement please?
let Source = (datetimecolumn as datetime) => let date = DateTime.Date(datetimecolumn), time = DateTime.Time(datetimecolumn), lastSundayOfOctober = Date.StartOfWeek(#date(Date.Year(date), 10, 31), Day.Sunday), lastSundayOfMarch = Date.StartOfWeek(#date(Date.Year(date), 3, 31), Day.Sunday), isSummerTime = (date = lastSundayOfMarch and time >= #time(2,0,0)) or (date > lastSundayOfMarch and date < lastSundayOfOctober) or (date = lastSundayOfOctober and time <= #time(2,0,0)), timeZone = 1 + Number.From(isSummerTime), CET = DateTime.From(date) + #duration(0,Time.Hour(time),Time.Minute(time),Time.Second(time)) + #duration(0, timeZone, 0, 0) in CET in Source 2e
-
How to get record before and after in forall loop powerapps
I am trying to run a function that returns a table with a corresponding date index and date text. This is so that I can display the information in a tutorial screen. However, I am confused on how to access to the previous record. Here is my pseudocode:
ForAll( Tweets (sorted by crf1d_date_index), If(the record IS NOT the LAST record, If('crf1d_date_index' != 'crf1d_date_index' of the NEXT record, { Step: crf1d_date_index, Text: crf1d_tweet_time } ) ) If(the record IS the LAST record, If('crf1d_date_index' != 'crf1d_date_index' of the PREVIOUS record), { Step: crf1d_date_index, Text: crf1d_tweet_time } ) )
-
How to set ProgID for file extension in ClickOnce deployment
I am attempting to register a protocol handler with a specified ProgID
<uap:Extension Category="windows.protocol"> <uap:Protocol Name="callto" > <rescap3:MigrationProgIds> <rescap3:MigrationProgId>Foo.Uri.1</rescap3:MigrationProgId> </rescap3:MigrationProgIds> </uap:Protocol > </uap:Extension>
However, I get a warning in my .appxmanifest of invalid child element on MigrationProgIds although the package builds and installs. Instead of the expected entry in HKEY_CLASSES_ROOT of Foo.Uri.1 I get something along the lines of ProgId="AppXnhz4zkbe9t8kpaax3epmedatp0f4kh8e"
Am I misunderstanding the purpose of MigrationProgId or is there something wrong with my markup?
Thanks
-
Windows Application is installing seperate instance as opposed to updating previous version after publish
I'm currently working on a .Net framework 4 Windows application that I've inherited from another developer(that's left my place) that updates from a UNC location.
Whenever I take the old version of the app and publish the new version on top of it and run the setup it installs a separate instance of the application on the machine as opposed to updating the previous version, my suspicion is that this is due to the ClickOnce manifests being signed with a . PFX key that we have lost the password to, but I can't be sure that this is definitely the reason why.
does anyone know how I'd be able to publish the app up to update the previous version without the user having to uninstall/reinstall the app?
-
Ways to run Excel's Add-in automaticly using triggers
I need to run automaticly an addin (XLAM), using triggers for example when the user insert a table/image or when he/she write something in a cell. I need the addin to be launched without calling the function.
-
Is there a way to open a linked workbook in Excel using Office.js?
I am trying to programmatically open a linked workbook referenced in the current workbook in Excel using the Office.js framework. I see an Excel.LinkedWorkbook class but with no function to open the linked workbook. How would I do this?