Posts

Showing posts with the label Excel

Expand and Collapse feature in PowerApps

Write the following on APP Start Code: Clear(colTreeElement);    ForAll(    TreeViewElement,    Collect(      colTreeElement,      {        ElmntName: Switch(          'Element Name',          "India",          Concatenate(            "India",            "                                     ",            "Score:4"          ),          "United States",          Concatenate(            "United States",            "                     ...

How to Merge two excel sheets into one in c#.

Image
In this blog I am going to explain how we could merge two different excel sheets into one using C# programing. For this demo I have taken a console application, check the below steps and use the code as it is. 1. First of all create two different Excel files and put some data into those sheets, remember to RENAME the worksheet name because same name will create Error while processing Merging process. eg., Plz check the encircled area in below images:: 2. Add References. At minimum, you will need below referances. static void Main(string[] args) {   MergeExcelNew(); }     private static void MergeExcelNew() {     Application app = new Microsoft.Office.Interop.Excel.Application();     Workbook bookDest = null;     Worksheet sheetDest = null;     Workbook bookSource = null;     Worksheet sheetSource = null;     string sTempPath = @"D:\Temp\Sheet1_Folder\Sheet1.xlsx";     string sFi...

Code for Data Export from GridView to Excel in Asp.Net- c#

In this blog, I am going to show how we could export our data from a gridview to excel sheet in Asp.net- c# (Export to excel data) First of all, just take a gridview on your design page and fill data as below :: protected void Page_Load(object sender, EventArgs e)     {         if (!IsPostBack)         {            BindGrid();         }     }     protected void BindGrid()     {         gvDetails.DataSource = this.getData();         gvDetails.DataBind();     }     private DataTable getData()     {         DataTable dt = new DataTable();         dt.Columns.Add("UserId", ...
go to top image