WPF - GridDesktop (.NET) > turn off Filters on export, resolution problems (4k), cell/wb/sheet locking?

Hi!
This is a multi-problem topic

  1. Every time I save my excel from a GridDesktop, the final file has every column used as a filter on the first line.
    How do I disable this ?
    Filtry.png (29.7 KB)

  2. When opening GridDesktop on a laptop with 4k display, all the UI is tiny, making it impossible, to read headers, or click and orient around.
    How do I fix this? How do I set the standard, or force a change?
    tiny Excel preview 4k.png (64.7 KB)

2.1. This might not relate to the previous, but is there a way to set the minimum size of table shown in GridDesktop preview ? To force the view to set it’s minimum size ignoring the cells empty state?
tiny Excel preview 4k_2.png (16.6 KB)

  1. How do I, or can I even lock a cell, workbook or a sheet?

Thank you.

@Bunnykill,

Thanks for the screenshots and details.

  1. Please create a simple project, zip the project (using latest version/fix: Aspose.Cells.GridDesktop v19.5) and post us here to show the issue, we will check it soon. Also provide your input (if any) and output files.

  2. I think you may try to use zoom feature (similar to Ms Excel’s Zoom feature) for your needs, see the document for your reference:
    Zooming In or Out On the Worksheet in GridDesktop|Documentation

2.1) By default if there are null/blank cells in the worksheet, Aspose.Cells.GridDesktop will minimize the size based on the dataset/contents in the sheet, so apparently you do not need to do anything. But if those empty cells are initialized or have some sort of formatting/data, the control will not minimize the table as it should not do this. If you find any issue, kindly do provide your template file, we will check it soon.

  1. See the document for your reference:
    Adding Cell Protection in Worksheet|Documentation

Thank you!

  1. I went and made a AsposeExample project in WPF as follows, I have downloaded the latest libraries and the filters are still being created.

steps to reproduce the issue:

  • open Excel file (from a directory or a stream) and import it to Aspose.GridDesktop
  • save/export the Excel file (anywhere else as a file xlsx)
    open the created file in Excel and you will see the filters that weren’t there before.

Before:
no_filters.png (32.6 KB)

After:
filters.png (28.2 KB)

All files including the xlsx (Before / After) are available in the example zip here:
http://leteckaposta.cz/933375497 (I had to use a cloud repository, since it failed to upload here)

  1. I am not sure if that would help since the problem is only about the user interface … such as buttons, sliders, headers, and such. But I will give it a try later, thank you.

2.1. So, anything i set to a cell that would normally get “hidden” makes it (and all the previous cells in rows and columns) visible ? That sounds simple. Thank you

  1. That is very helpful! Again, thanks.

@Bunnykill,

Thanks for the sample project with template file.

  1. It looks strange and you are right, the auto-filters arrow do appear in the heading row in the output file. We need to evaluate it and check the reason why this is happening, we will look into it soon. In the mean time, please try to add a line of code to figure out your issue:
    e.g
    Sample code:


private void saveExcel_Click(object sender, RoutedEventArgs e)
{
System.Windows.Forms.SaveFileDialog saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();

        saveFileDialog1.Filter = "xlsx files (*.xlsx)|*.xlsx"; 

        saveFileDialog1.FilterIndex = 1;
        saveFileDialog1.RestoreDirectory = true;

        if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        {
            try
            {
                string fn = System.IO.Path.GetExtension(saveFileDialog1.FileName);
                if (fn == ".xlsx")

(WFHost.Child as GridDesktop).GetActiveWorksheet().RemoveAutoFilter();
(WFHost.Child as GridDesktop).ExportExcelFile(saveFileDialog1.FileName, FileFormatType.Excel2007Xlsx);
this.Close();
}
catch
{
}
}
}

2.1) I am not sure about your issue, if you find anything different than what MS Excel does (when opening it into Ms Excel), write back with details and sample file, we will check it soon.

  1. That seems to be working just fine! Thank you!

  2. I cannot really reproduce the issue right now, but I will let you know when the time comes.

@Bunnykill,

  1. Good to know that your issue is sorted out by the suggested line of code.

  2. Sure, please take your time to create a simulation project to demonstrate the issue, we will check and help you through.

Hi again!
So, my company provided me with 4k monitor just so I can test this properly.
And - I think, that I found where the problem roots.

If I have a high enough resolution and I set my zoom (and then you have to relog to apply the settings, possibly even set the 4k as your main display), then the Aspose GridDesktop controls won’t resize at all and remain the default size.

That I can show you here:
resolution4k.png (159.2 KB)

Just to make sure, I will mark it for you here:
resolution4k_marked.png (93.5 KB)

Can I overcome such a thing happening again? Or change it somehow?
Does it relate to the zooming thing that you already posted? (because I don’t see that, but I might be wrong)

Thank you very much!

BunnyKill,

Thanks for the screenshots.

Well. we got to arrange the 4k monitor to test the scenario. Could you also capture a demo video to demonstrate the issue on 4k monitor and provide us, we will log an investigation ticket for it.

Hi,
thank you,
I have recorded the requested video(s) where I demonstrate how the issue happens
Record was made by OBS (Open Broadcaster Software)

  1. to demonstrate how it looks without zoom:
    demonstration_4k_no-zoom.zip (3.5 MB)
    This is very much correct and OK

but, when you go and set it up to 250% zoom (this is the default option that my boss has on his laptop main screen, because it is rather small in size for a 4k screen)

  1. then it looks like this (keep in mind that I was unable to record since you have to relog to apply the changes):
    demonstration_4k_zoomed.zip (3.1 MB)
    and to show the settings here too:
    demonstration_4k_WinSettings.zip (3.5 MB)
    And that is where it all goes horribly wrong and unusable

That is the issue.
Thank you.

@Bunnykill,

Thanks for the demo videos to demonstrate the issue.

I noticed the issue seeing your demos. It seems an issue with Aspose.Cells.GridDesktop display when setting resolutions and zoom (display settings) in a 4k monitor. I have logged an investigation ticket with an id “CELLSNET-46761” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

@Bunnykill,
Could you please try based on this solution:
High DPI support - Windows Forms .NET Framework | Microsoft Learn.

Let us know your feedback.

@Bunnykill,
This is to inform you that we have also done automatic size adjustment for the bottom menu and Header Row/Column to be suitable with zoom. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

The issues you have found earlier (filed as CELLSNET-46761) have been fixed in Aspose.Cells for .NET v19.6. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi