I have a .NET Core 3.1 WebApp using ClosedXML to export data to Excel.
So far I'm very impressed.
I use EFCore to map my query result to a class and that data gets exported:
worksheet.Cell(1, 1).InsertTable(data, false);
I already figured out I can use the XLColumn attribute to control the headers in the Excel sheet.
But I have about 100 columns, most of them can have the name of the property but some need to change.
I've added the properties of the class in the order I want to export them to Excel but if I add the XLColumn attribute the order is changed. It looks like first all properties with this attribute are exported and next the remaining properties.
Can I change that, because now I need to add the XLColumn attribute to all of my properties?
A second related question.
Most of my decimal properties need to be exported as a currency. How to tell ClosedXML that?
I tried adding [DataType(DataType.Currency)] to my property but that didn't change anything.
Related
We have created workbooks under the Azure AD. Trying to use the export parameter under the Advances setting of KQL to load the parameter related data on click.
It is working perfectly fine when I am choosing the grid visualization instead of pie.
Our requirement is to have the pie chart and when hovering on it, should load the related data in another grid view.
Is this limitation of a workbook or something I am missing?
Thanks.
you can also export selections from charts, but the available fields are not the names of the columns like in a grid. there's no way to have hover export selections though.
from the github docs (emphasis added):
Note: you can leave the Field to export setting empty in the export settings. If you do, all available fields in the data will be exported as a stringified JSON object of key:value pairs. For grids and tiles, this will be all of the fields in the grid. For charts, the available fields will be x, y, series, label (depending on the type of chart).
I'm working on getting this updated in our public azure docs, which for some reason only have 1 one of the three "note" items in that section.
I am trying to make a customized site Content and I have made it successfully on Document library.While uploading it gets uploaded well but the by default behavior of document library shows me three but default column which is there in the image
1)Name
2)Modified
3)Modified By
I want to add 4th Column with user input named as a description.
Image is as follows:how to add Column in
From what I understood from your issue is, your column is getting created but not visible on view. When you create column column has property as SPField.ShowInDisplayForm , SPField.ShowInViewForms like properties. Its a Boolean value.
I recently got tasked with customizing a report in an access database, I havent touched access in years so its a little rusty for me. I have successfully added the Fields to the table, added them to the form and added them to the report. If i run the report they query correctly. But all the other fields on the report are setup with an expression such as:
=IIF([Mold Temp High]=0,"----",[Mold Temp High])
Now the expression makes 100% to me but when it auto populates the field, such as Mold Temp High, for all the previous fields i can see they show up as Record Source Column fields, but for any new field i have added shows up as a Text Box.
If i create an expression with the new fields i get a Circular Reference and it shows #type on the report instead of the value.
Just curious to why the new fields show up as TextBoxs and not Record Sources.
I'm guessing that you are dragging the new fields from the field list. When you do this, it creates the text box with the exact same name as the data field. So when you use this name in an expression, it thinks you are referencing the text box object. To prevent this problem, make sure that every time you create a new textbox (or any control) from a data field that you name it something different by setting the Name property of the text box. Generally I just add "txt" to the front of the field name. This will ensure that you are always explicitly referring to either the textbox name or the data field name.
What if you change your logic around a bit..
We remember, IIF is constructed as:
=IIF((Some_Table_Field or value),True-condition,False-condtion)
You maybe looking at:
=IIF([Mold Temp High]=NULL,"----",[Mold Temp High])
Or, maybe (use ISNULL or ISBLANK it has been a while for Access with me as well):
=IIF(isnull([Mold Temp High]),"----",[Mold Temp High])
Or, rather:
=IIF([Mold Temp High]<1,"----",[Mold Temp High])
Hope this makes sense.
how can I check if something is selected there? I need at least 'fact': selected or not (and would be nice to know how to read real settings).
I looked into NotesViewColumn and did not find anything there, maybe it's undocumented feature :(
You can use DXL. The DXL schema for view columns includes an attribute that represents the selected option for the totals.
I.e. set up a NotesNoteCollection object that includes the view design note. Use NotesSession.CreateDXLExporter to get a NotesDXLExporter and process the NotesNoteCollection, parsing the XML to locate the column and get the value for the totals attribute.
I've created a custom field type based on SPFieldLookup. When I use SharePoint's "Export to Spreadsheet" function, however, it's not rendered correctly.
For normal lookup fields, only the Lookup Value is rendered. For my custom field, the string representation of the lookup value is used (i.e., "1;#My Lookup Value").
Is there a way to change the custom lookup field so that it will render only the Lookup Value when exported to a spreadsheet?
I'm not sure if its possible to do what you want.
Here's a note from the SPFieldLookup documentation on MSDN:
Notes to Inheritors: In Windows SharePoint Services 3.0, columns based on custom field types do not appear in Datasheet view and are not included when you export a list to a Microsoft Excel spreadsheet.
Maybe you can look into the DisplayPattern element in your fldtypes_XXX.xml