Search code examples
c#sharepointvstoadd-inexcel-addins

Excel addin (C#) + SharePoint 2003


there is Excel add-in that generates an information sheet. The client has this Excel addin.

There is portal SharePoint 2003.

On the client in Excel addin there is a button to click which add excel document on SharePoint 2003 portal.

How can I do to add the document to the portal?


Solution

  • Following link provides you information regarding all Add-in in Excel. It also shows you step by step approach for dealing with this in terms of images.

    http://www.add-in-express.com/docs/net-excel-automation-addins.php

    Refer Following code:

    void Application_WorkbookBeforeSave(Microsoft.Office.Interop.Excel.Workbook Wb, bool SaveAsUI, ref bool Cancel)
        {
            Excel.Worksheet activeWorksheet = ((Excel.Worksheet)Application.ActiveSheet);
            Excel.Range firstRow = activeWorksheet.get_Range("A1");
            firstRow.EntireRow.Insert(Excel.XlInsertShiftDirection.xlShiftDown);
            Excel.Range newFirstRow = activeWorksheet.get_Range("A1");
            newFirstRow.Value2 = "This text was added by using code";
        }
    

    This Code belongs to following link which gives you all walk throughs for Creating Your First Application-Level Add-in for Excel.

    http://msdn.microsoft.com/en-us/library/vstudio/cc668205.aspx

    Hope its helpful.