Hi,
I would like to know which kind of feature in Excel for example range, autofit, shiftdirection but is not in Infragistic.
How to transform all this features using Infragistic.Excel that will having the same result as Excel did.
Thanks!
Hello FeiYi,
Thank you for posting in our forum.
Infragistics Excel Engine supports many features of MS Excel like creating and reading MS Excel xls and xlsx files, working with worksheets, columns, rows, cells, regions and many more. Additional information about most frequently used scenarios you may find by following the next link http://help.infragistics.com/Doc/WinForms/current/CLR4.0/?page=ExcelEngine_Using_the_Infragistics_Excel_Engine.html
Infragistics Excel Engine exposes WorkSheetRegion property which is very similar to Range. More information about this property you may find by following the next link http://help.infragistics.com/Help/Doc/WinForms/2015.1/CLR4.0/html/Infragistics4.Documents.Excel.v15.1~Infragistics.Documents.Excel.WorksheetRegion_members.html
Please check also the next link to find how you can fit the content of the cells, rows and columns in exported workbook http://help.infragistics.com/Doc/WinForms/current/CLR4.0/?page=ExcelEngine_Resizing_Rows_and_Columns.html
You may check also the API overview of the Infragistics Excel Engine here http://help.infragistics.com/Doc/WinForms/current/CLR4.0/?page=ExcelEngine_API_Overview.html
Please let me know if you need any additional information regarding Infragistics Excel Engine.
Hi Milko,
How about the autofit ?
Does it able to be call from infragistic.excel like below?
eSheet.Cells.EntireColumn.AutoFit();
eSheet.Cells.EntireRow.AutoFit();
And also the shift direction. Which I actually need it for my report with multiple grouping in a single sheet, and once it filter on a particular group in wont impact to other group.
By the way, what is the different between Infragistict.Excel with Infragistict.Document.Excel?
Regards,
Fei Yi
Thank you for your feedback.
Please find bellow answers to your questions:
How about the autofit? – right now there is no build in auto-fit functionality in our Excel engine. Please note the same product idea has already been submitted here http://ideas.infragistics.com/forums/192360-asp-net/suggestions/5392554-add-auto-fit-feature-to-excel-library-which-aut. As a member of the Infragistics Community you can vote for the features and suggestions you want to see added to the products, resulting in the most popular features bubbling up to the top. When planning new releases, our Product Management team will look at the most popular features and use your feedback to prioritize upcoming work.
And also the shift direction. Which I actually need it for my report with multiple grouping in a single sheet, and once it filter on a particular group in wont impact to other group – if I understand you correctly you have several ranges in the same worksheet. You need to apply grouping to each range and separate filtering. You may achieve this by converting the ranges to WorksheetTables. More about WorksheetTables you may find by following the next link http://help.infragistics.com/Doc/WinForms/current/CLR4.0/?page=ExcelEngine_Resizing_Rows_and_Columns.html
By the way, what is the different between Infragistict.Excel with Infragistict.Document.Excel? – these are the same namespaces. We used to use Infragistics.Excel namespace in old version of Infragistics Controls and changed it to Infragistics.Documents.Excel in more recent ones.
Please let me know if you need any additional information related to Infragistics Excel.
Hello Milko,
It is not about the re-sizing the row and column.
Perhaps the screen shot can explain in detail how I want my excel data to be.
For the different namespace of the Infragistics Excel engine, currently am using the Excel instead of the Document.Excel it should not a problem using the older version right?
Besides, there is one more about the merge.
when I try to put the start column =0, mergeregion value is empty, but it works when I change the start column =1.
Below is the code:
WorksheetMergedCellsRegion MergeRegion = eSheet.MergedCellsRegions.Add(ExcelRow + 2, 1, ExcelRow + 2, iCol-1);
MergeRegion.Value = dt.Rows[ExcelRow + 1][j-1].ToString();
It is not about the re-sizing the row and column? – For some reason I do not get any image. Can you please try to upload it again?
For the different namespace of the Infragistics Excel engine, currently am using the Excel instead of the Document.Excel it should not a problem using the older version right? – Yes, this should not be an issue. You can also should be able to upgrade to the latest version.
When I try to put the start column =0, mergeregion value is empty, but it works when I change the start column =1? – I have created a small sample solution, attached, and it did not reproduce this behavior. Please note my sample was built with the latest version of Infragistics Controls 15 Volume 1. Please test it at your side and let me know if it reproduce this issue or not. Please give me also information about which version of Infragistics Controls you are using. Also if this is not correct representation of your logic please try to send me a small sample solution reproducing this behavior or fill free to change may sample and send it back to me.
Looking forward to your reply.
How to insert the image in the post here? Do I need to upload it to somewhere else so that I can show it here, as I click on the Insert/Edit Image it need the link.
Coz I try to copy and paste from the screen shot seem like is not working...
Let have another try....I upload at the bottom here again..
If you cannot upload your images please put them in a zip archive and try to upload the archive. If this still not working you may send them to this email support@infragistics.com. Please if you send them by mail put this number as a subject CAS-156134-L7K8Z7.
I had email the attachment to the support team.
But in the mean while maybe I can just type it out.
This is the grouping:
Without the shiftdown function if I select the Group1A-D as filter it will apply the filter to the Group2A-D
With the shiftdown, the filtering only apply to the Group1A-D.
We’ve received your email.
So you could use WorksheetTable feature of Infragistics Excel engine which will allows you to place different table in same worksheet. Based on the provided screen shot I’ve modified Milko’s sample in order to demonstrate you this approach.
Please let me know if you have any further questions.
Hi Hristro,
The method use is to plot the data user the getCell function instead of by range.
But is not working on my excel :(
Below is my code: ( fyi, am using the infragistics.Excel instead of infragistics.Document.Excel)
int rowCount = 1; int ExcelRow = 1; string[] SplitRange = strRange.Split(':'); string startCell = SplitRange[0].ToString(); string endCell = SplitRange[1].ToString(); string value = dt.Rows[0][1].ToString(); WorksheetRegion erange = eSheet.GetRegion(strRange); WorksheetMergedCellsRegion FirstRegion = eSheet.MergedCellsRegions.Add(1, 1, 1, iCol - 1); FirstRegion.Value = value; var startColumn = Convert.ToChar( startCell.Substring(0,1)); var endColumn = Convert.ToChar(endCell.Substring(0,1)); foreach (DataRow dr in dt.Rows) { if (rowCount == dt.Rows.Count) return; rowCount += 1; ExcelRow += 1; for (int j = 0; j < dt.Columns.Count; j++) { //Add the header the first time through if (rowCount == 2) { string headerAddress = string.Format("{0}{1}", aCol[j], ExcelRow); var heardercell = eSheet.GetCell(headerAddress); heardercell.Value = dt.Columns[j].ColumnName; } string cellAddress = string.Format("{0}{1}", aCol[j], ExcelRow); var dataCell = eSheet.GetCell(cellAddress); dataCell.Value = dr[j].ToString(); } }
int rowCount = 1; int ExcelRow = 1; string[] SplitRange = strRange.Split(':'); string startCell = SplitRange[0].ToString(); string endCell = SplitRange[1].ToString();
string value = dt.Rows[0][1].ToString();
WorksheetRegion erange = eSheet.GetRegion(strRange);
WorksheetMergedCellsRegion FirstRegion = eSheet.MergedCellsRegions.Add(1, 1, 1, iCol - 1); FirstRegion.Value = value; var startColumn = Convert.ToChar( startCell.Substring(0,1)); var endColumn = Convert.ToChar(endCell.Substring(0,1));
foreach (DataRow dr in dt.Rows) { if (rowCount == dt.Rows.Count) return;
rowCount += 1; ExcelRow += 1;
for (int j = 0; j < dt.Columns.Count; j++) { //Add the header the first time through if (rowCount == 2) { string headerAddress = string.Format("{0}{1}", aCol[j], ExcelRow); var heardercell = eSheet.GetCell(headerAddress); heardercell.Value = dt.Columns[j].ColumnName;
}
string cellAddress = string.Format("{0}{1}", aCol[j], ExcelRow); var dataCell = eSheet.GetCell(cellAddress); dataCell.Value = dr[j].ToString();
and how to format all the digit automatically as number? Currently it will show the "Exclamation mark" on each cell, to notify whether to change store it as number/test.