Home » Visual Studio

Using Microsoft.office.interop.excel.dll witout installing Office


I need to open Excel 2007 files with over 2700 columns each. I tried using OLEDB and it only retrieves the first 255 columns on each query. Cannot seem to get them all at once. Then I tried Office Interop. I am able to transform the Used Range into a DataTable. Now the problem is that I cannot migrate my code and compile it if the target machine does not have Office Installed.

Is there a way I can install the Interop assamblies without installing Office?
Efrain Juarez


4 Answers Found


Answer 1

Hi Efrain,

Thank you for your reply.

To obtain the reference to interop  with excel  in your program, you have to install the PIA of excel (first install Excel). Thus, you need to install Office. Then install PIA.

Hope this helps! If you have any concern, please feel free to let me know.l

Have a great weekend.

Best regards,
Yichun Chen

Answer 2

Hi Yichun,

Thanks for your response. I have another question though, is ti possible to reference to Interop without installing  Excel at all? I would like to be able to develop my app with the Interop with Excel 2007 in it, but at the same time, I would like to run my app in other boxes without Excel, or any other Office product installed in it.

Thanks, you have a nice weekend too.

Efrian Juarez


Answer 3

Hi Efrain,

Thank you for your post.

I can understand the situation that you came across. However, as far as I know, I'm afraid that it's not possible. To refer to Interop, we have to install excel  before the PIA of excel.

Hope this helps! If you have any concern, please feel free to let me know.

Best regards,
Yichun Chen
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

Answer 4



I've found you can actually get that dll  from the Excel viewer, so if you want a lighter install try that.


I keep Office tools off my dev machine, but had found it useful to have a viewer. I'm not sure how much smaller or lighter the viewer is, mind, so this may not help much.





We have created a project that compiles, links, and executes just fine.  However, when I build, Microsoft.Office.Interop.Excel.dll and office.dll appear in my bin directory.  There are no references to either of these in our application, and if I delete them from my bin directory the application runs just fine.

I have Visual Studio 2008 and Office 2003 on my PC.

When my colleague builds, these two libraries do not appear in the bin directory.

He has Visual Studio 2008 and Office 2007 on his PC.

Can someone help me figure out what is causing my PC to include these unnecessary DLLs?


I am trying to use this namespace and downloaded the O2003pia.exe from http://support.microsoft.com/kb/897646.

I ran the msi and see the Interop files in the GAC but when I try to 'Add a Reference' in VS2005, I do not see any of the Interop namespaces.

I already had Office 2003 installed before I ran the above msi.

What else am I doing wrong. Why aren't these included with VS2005 in the first place..............

Please help,



Hi, I have the following question, I create a project that creates a pivot able in excel.

I have for reference the 'dll' - Microsoft.Office.Interop.Excel.dll

When  run the application in 32-bit platforms, is working just fine, for 64-bit platforms I receive an exception.

This happens in Windows7, Excel 2010 64 bit platform.

This is the code:

using Excel = Microsoft.Office.Interop.Excel; 

string table = "'[Book1]Sheet1'!R3C1"; 

Excel.PivotTable pivotTableObj = null; 


pivotTableObj = pivotCache.CreatePivotTable(tableDest, Type.Missing, true, Excel.XlPivotTableVersionList.xlPivotTableVersion10); 

catch (COMException e) 

// here is where I go in ! ! ! ! 

throw e; 

I was wandering what I need to change in the code to support, 64-bit platforms? 

Or there is 'Microsoft.Office.Interop.Excel.dll' version for 64-bit platforms?

Thanks in advanced



My server is windows 2008 R2. Everything is running well except the following.

Whenever I tried to export to excel using:

Microsoft.Office.Interop.Excel.ApplicationClass app = new Microsoft.Office.Interop.Excel.ApplicationClass();

It shows exception:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005

I searched on google, almost every suggestion told me to find Microsoft Excel Application in DomConfig. But I found no Microsoft Excel in DomConfig. Please note, I have Excel 2003 & 2007 on that server.

Please help me, its really urgent.


Hi ,

I need to create some Excel Report using C#. I don't have excel installed in Server. So i need to use Microsoft.Office.Interop.Excel Reference.

Can I get sample code for creating Excel file.




I need to create an excel file from the database records. I fetched and put the data in an excel file and tried to save that file as follows.


string SavedFileName = Server.MapPath("../NLR/WIP/WIP_" + toDay + ".xls");

excelWorkbook.SaveAs(SavedFileName, Excel.

XlFileFormat.xlWorkbookNormal, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing, Type.Missing, Type.Missing);


//@@ and released the excell process withthe following function



void killExcelProc()


foreach (System.Diagnostics.Process Proc in System.Diagnostics.Process.GetProcessesByName("EXCEL"))





** Now in my XP machine IIS server it is running fine with out any problem. But in windows 2003 Server I am getting the following error
System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot access the file 'D:\RadioSQA\NLR\WIP'. There are several possible reasons: • The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook. at Excel.WorkbookClass.SaveAs(Object Filename, Object FileFormat, Object Password, Object WriteResPassword, Object ReadOnlyRecommended, Object CreateBackup, XlSaveAsAccessMode AccessMode, Object ConflictResolution, Object AddToMru, Object TextCodepage, Object TextVisualLayout) at Reports_WIP.btnWIP_Click(Object sender, EventArgs e)

When I opened task manager I didn't find any excel process running. I have given the full permission to the virtual directory (Deployed folder) for ASPNET user. I modified the DCOMConfig configeration (For XP it is ASPNET and for 2003 it is NETWORK SERVICE). I think my application is not being able to save the excel file in the application. But I don't know why.. Please give me light and also tell me what I will have to do.


hi all. when i'm using Range.Group method from Interop.Excel it groups me by columns, the issue is that i want to group my data by rows .

this is my code:

static object useDefault = Type.Missing;

static void SetCellValue(Worksheet targetSheet, string cell,
            object value)
            targetSheet.get_Range(cell, useDefault).set_Value(
                XlRangeValueDataType.xlRangeValueDefault, value);

static void GenerateGroupedRows()
            // Declare variables that hold references to excel objects.
            ApplicationClass excelApplication = null;
            Workbook excelWorkBook = null;
            Worksheet targetSheet = null;
            Range testRange = null;

            // Declare helper variables.
            string workBookName = @"E:\TestExcel.xlsx";
            string workSheetName = "group rows";
                // Create an instance of Excel.
                excelApplication = new ApplicationClass();

                //Create a workbook and add a worksheet.
                excelWorkBook = excelApplication.Workbooks.Add(

                targetSheet = (Worksheet)(excelWorkBook.Worksheets[1]);
                excelWorkBook.Worksheets.Add(System.Reflection.Missing.Value, targetSheet, 1, System.Reflection.Missing.Value);
                targetSheet.Name = workSheetName;

                // Add Data to the Worksheet.

                SetCellValue(targetSheet, "A2", "0");
                SetCellValue(targetSheet, "B2", "1610");
                SetCellValue(targetSheet, "C2", "0");
                SetCellValue(targetSheet, "D2", "0");
                SetCellValue(targetSheet, "E2", "0");
                SetCellValue(targetSheet, "F2", "1000");
                SetCellValue(targetSheet, "G2", "0");
                SetCellValue(targetSheet, "H2", "1000");

                SetCellValue(targetSheet, "A3", "1610");
                SetCellValue(targetSheet, "B3", "1610.01");
                SetCellValue(targetSheet, "C3", "0");
                SetCellValue(targetSheet, "D3", "0");
                SetCellValue(targetSheet, "E3", "0");
                SetCellValue(targetSheet, "F3", "500");
                SetCellValue(targetSheet, "G3", "0");
                SetCellValue(targetSheet, "H3", "500");

                SetCellValue(targetSheet, "A4", "1610.01");
                SetCellValue(targetSheet, "B4", "1610.01.01");
                SetCellValue(targetSheet, "C4", "0");
                SetCellValue(targetSheet, "D4", "0");
                SetCellValue(targetSheet, "E4", "0");
                SetCellValue(targetSheet, "F4", "250");
                SetCellValue(targetSheet, "G4", "0");
                SetCellValue(targetSheet, "H4", "250");

               testRange = targetSheet.get_Range("A2", "H4");


               testRange .Group(useDefault, useDefault, useDefault, useDefault);

                // Save the Workbook.
                excelWorkBook.SaveAs(workBookName, useDefault, useDefault,
                    useDefault, useDefault, useDefault,
                    XlSaveAsAccessMode.xlNoChange, useDefault, useDefault,
                    useDefault, useDefault, useDefault);

            catch (Exception ex)
                // Release the references to the Excel objects.
                testRange = null;

                // Release the Workbook object.
                if (excelWorkBook != null)
                    excelWorkBook = null;

                // Release the ApplicationClass object.
                if (excelApplication != null)
                    excelApplication = null;



I installed the express version of .NEW 2010 but I can't find the Microsoft.Office.Interop DLL. I need to add a reference to this in order to make PowerPoint slides programmatically but can't without this library. Does the express version not have this?

Hi !

I have application which can export slides to PowerPoint. I'm using Microsoft.Office.Interop.PowerPoint.dll . This is the 11th version of assembly. I have ran application today and it seems that application throws an exception (Exception from HRESULT: 0x80070057 (E_INVALIDARG)). It only throws this exception when there is powerpoint application opened in system before i click export button. I'm adding a custom property to CustomDocumentProperties of Powerpoint presentation in order to identify which presentation was created by the application.  This is the first time when I saw this exception. I have Windows 7 Ultimate x64 sytem with visual studio 2008 and 2010 and of course office 2007.

The part of code that causes the exception:

oDocAuthorProp = typeDocBuiltInProps.InvokeMember("Item",
                                                       BindingFlags.Default |
                                                       null, oDocBuiltInProps,
                                                       new object[] { strIndex });


What's wrong?

I followed this article by Microsoft: http://support.microsoft.com/kb/303296

For over one year the Application has been working without any issue. What goes wrong? After 10 hours spent on searching the Internet for the answer I'm giving up.

here is the code of the Export2Powerpoint method:


public static void Export(List<ChartObject> chartObjects)

                Application ppApp = new Application();

                foreach (ChartObject chartObject in chartObjects)
                    chartObject.Chart.BorderLineStyle = ChartDashStyle.NotSet;

                Presentation ppPress = null;

                int i;
                object oDocBuiltInProps;
                string strValue = string.Empty;

                if(ppApp.Presentations.Count == 0)
                    ppPress = AddPresentation(ppApp, ppPress);
                    i = 0;

                    object oDocAuthorProp = null;

                    foreach (Presentation presentation in ppApp.Presentations)
                        oDocBuiltInProps = presentation.CustomDocumentProperties;
                        Type typeDocBuiltInProps = oDocBuiltInProps.GetType();
                        string strIndex = "Browser";


                            oDocAuthorProp = typeDocBuiltInProps.InvokeMember("Item",
                                                       BindingFlags.Default |
                                                       null, oDocBuiltInProps,
                                                       new object[] { strIndex }); ======>> here is the line that generates the exception

                        catch(Exception e)
                            //ErrorHandling.LogErrorToFile(e.Message, e.StackTrace);
                        if (oDocAuthorProp != null)
                            Type typeDocAuthorProp = oDocAuthorProp.GetType();
                            strValue = typeDocAuthorProp.InvokeMember("Value",
                                                                      BindingFlags.Default |
                                                                      null, oDocAuthorProp,
                                                                      new object[] {}).ToString();


                        if(strValue == "true")

                    if (strValue != string.Empty)
                        ppPress = ppApp.Presentations[i];
                        ppPress = AddPresentation(ppApp, ppPress);

                i = ppPress.Slides.Count + 1;

                int j = 0;
                chartObjects.ForEach(chartObject =>
                         string directory = Path.Combine(System.Windows.Forms.Application.StartupPath, (i) + ".png");
                         PowerPoint.Slide actSlide = ppPress.Slides.Add(i, PpSlideLayout.ppLayoutBlank);
                         actSlide = ppPress.Slides[i];
                         Size size = chartObject.Chart.Size;

                         chartObject.Chart.ChartAreas[0].AxisX.LabelsAutoFitMinFontSize = 14;
                         chartObject.Chart.Size = new Size(RunTime.Configuration.ImageXSize,RunTime.Configuration.ImageYSize);
                         chartObject.Chart.SaveAsImage(directory, ChartImageFormat.Png);
                         chartObject.Chart.Size = size;
                         Image image = Image.FromFile(directory);
                         actSlide.Shapes.AddPicture(directory, MsoTriState.msoFalse,
                                  MsoTriState.msoTrue, 0, 0, (int)ppPress.SlideMaster.Width, (int)ppPress.SlideMaster.Height);


                ppApp.Visible = MsoTriState.msoTrue;
                foreach (ChartObject chartObject in chartObjects)
                    chartObject.Chart.BorderLineStyle = ChartDashStyle.Solid;


Can VB.NET be used to develop an application that uses the Microsoft.Office.Interop.UccApi.Dll?

If so, how do you get around the need for the application manifest file for the UCCAPI dll?

If not, is there a method to write a C# DLL wrapper around it?


I have a VB.Net app which creates an Excel report.  This is all working fine on my development box
which turns out to have MS Office 2003 installed.  The app works fine.  I added a reference to
Microsoft Excel 11.0 Object Library under the COM tab when I did the "Add Reference".  I also copied
the Interop.Excel.dll to my BIN folder.

The server that I need to deploy my app to does not have MS Office or Excel installed.  I ran the app
anyway just to see if it would worked.  Of course, it failed with this error:

Retrieving the COM class factory for component with CLSID {00020820-0000-0000-C000-000000000046} failed due to the follo
wing error: 80040154.

Do I need to have Excel installed on the target machine?  I took a copy of "Microsoft.Office.Interop.Excel.dll"
from the GAC on the DEV box and installed on the GAC on the target machine.  Tried the app again and still
failed with the same error.  I really don't want to install Excel if I don't have to.  Can someone please provide
some help on this?

Thank you in advance!

hi everyone,
 i have code that works fine for tables that are small .. but when the datable size goes up to 10,000+ export from datatable to dataset becomes really slow .. can one give me some suggestions.  here is the code  that i am using ..

publicvoid WriteToExcelSpreadsheet(string fileName, System.Data.DataTable dt)


string filepath = getPath(fileName).Trim();

//dt = SQLProductProvider.GetExcelImport();

// dt.WriteXml(filepath, XmlWriteMode.IgnoreSchema);

Microsoft.Office.Interop.Excel.Application ExlApp = new Microsoft.Office.Interop.Excel.Application();

int iCol, iRow, iColVal;

Object missing = System.Reflection.Missing.Value;

// Open the document that was chosen by the dialog

Microsoft.Office.Interop.Excel.Workbook aBook;



//'re-initialize excel app

ExlApp = new Microsoft.Office.Interop.Excel.Application();

if (ExlApp == null)


//'throw an exception

throw (newException("Unable to Start Microsoft Excel"));




//'supresses overwrite warnings

ExlApp.DisplayAlerts = false;

//aBook = New Excel.Workbook

//'check if file exists

if (File.Exists(filepath))


aBook = ExlApp.Workbooks._Open(filepath, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing);




aBook = ExlApp.Workbooks.Add(Microsoft.Office.Interop.Excel.XlWBATemplate.xlWBATWorksheet);

}//End If

//With ExlApp

ExlApp.SheetsInNewWorkbook = 1;


//For displaying the column name in the the excel file.

for (iCol = 0; iCol < dt.Columns.Count; iCol++)


//'clear column name before setting a new value

ExlApp.Cells[1, iCol + 1] = "";

ExlApp.Cells[1, iCol + 1] = dt.Columns[iCol].ColumnName.ToString();


//For displaying the column value row-by-row in the the excel file.

for (iRow = 0; iRow < dt.Rows.Count ; iRow++)




for (iColVal = 0; iColVal < dt.Columns.Count; iColVal++)


if (dt.Rows[iRow].ItemArray[iColVal] isstring)


ExlApp.Cells[iRow + 2, iColVal + 1] = "'" + dt.Rows[iRow].ItemArray[iColVal].ToString();




ExlApp.Cells[iRow + 2, iColVal + 1] = dt.Rows[iRow].ItemArray[iColVal].ToString();

}//End If



catch (Exception ex)


Console.Write("ERROR: " + ex.Message);

}//End Try


if (File.Exists(filepath))


ExlApp.ActiveWorkbook.Save(); //fileName)




ExlApp.ActiveWorkbook.SaveAs(filepath.Trim(), missing, missing, missing, missing, missing, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange, missing, missing, missing, missing, missing);

}//End If

ExlApp.ActiveWorkbook.Close(true, missing, missing);

//End With

//Console.Write("File exported sucessfully");

}//End if


catch (System.Runtime.InteropServices.COMException ex)


Console.Write("ERROR: " + ex.Message);


catch (Exception ex)


Console.Write("ERROR: " + ex.Message);






aBook = null;

ExlApp = null;

}//End Try

}//End Sub


I am trying to set the color of a cell.

This sets it to RED

TheCell.Interior.ColorIndex = 3

This gets a run time error:

TheCell.Interior.ColorIndex = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Yellow)

I would rather use a descriptive word like RED or Yellow than some number.  And i dont' know what number Yellow is anyway.

What am I doing wrong.



I'm having trouble with Excel Interop.  I wrote a sample application:

ProtectedSub Button1_Click(ByVal sender AsObject, ByVal e As EventArgs) Handles Button1.Click

Dim xlApp AsNew Application()

Dim objWorkbook As Workbook

Dim objWorksheet As Worksheet

Dim objRange As Range

Dim intRow AsInteger

Dim intCell AsInteger

Dim strRow AsNewString("")

' Change the path to SOLVSAMP.XLS to match the path on your computer.

objWorkbook = xlApp.Workbooks.Open _

("C:\Documents and Settings\pmarino.USI\Desktop\sample.xls")

objWorksheet = objWorkbook.Worksheets.Item(1)

objRange = objWorksheet.Range("A2", "F16")

For intRow = 1 To 15

For intCell = 1 To 6

strRow = strRow & objRange.Cells(intRow, intCell).value & vbTab

Next intCell


strRow = ""

Next intRow


This works fine while debugging.  When I publish the application to localhost and then run, I get this message: Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). on this line:

Line 20:     objWorkbook = xlApp.Workbooks.Open _
Line 21:         ("C:\Documents and Settings\pmarino.USI\Desktop\sample.xls")

I have a reference to Microsoft.Office.Interop.Excel which is in c:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.Office.Interop.Excel.dll

Thanks for your help


I want to change the color of the plot area from default grey to otehr color. I cannot get access to the plotarea.interior method to access this function.

Any suggestion ?


I created an application using microsoft.office.interop.excel 12.0 which worked fine on my computer. The problem is that the customer has an older version of Excel and as soon as the Excel interop is accessed the program bombs out. I tried to change version 12.0 back to version 11.0 (removed 12 and added 11) but then I get errors all over the place:
Error 22 'Application' is ambiguous in the namespace 'Microsoft.Office.Interop.Excel'. etc.

in code like this:


Dim xlApp As Excel.Application
Dim xlwTmpInput As Excel.Worksheet
Dim xlwInput As Excel.Worksheet
Dim xlWkb As Excel.Worksheet

Any advice will be appreciated.


I deployed a web that will use Microsoft.Office.Interop.Excel to open a workbook with a query. It works FINE as long as I am running it from the debugger. I deployed it to a web site on my system and I can go to the page and it can access the database and everything is good until I try the button that will open excel with a query. Then it just sits there with the iexplorer tab icon spinning but nothing happens. It will spin for several minutes and then it just gives up - no message and the web page remains the same

I am suing VS2010, Framework 3.5, Microsoft.Office.Interop.Excel GAC




Hi Everyone. I wasn't sure which forum to put this under, so please move if necessary.


I have an app that exports a data table to excel. This works, however, i have a column with currency that i can't get formatted properly.


IE: Right now it prints 24450.00 or 24000 if a whole number with no decimal places.


I have tried a lot of things, but this is what i have right now for my range and formatting. Below is a copy of the method. Please let me know where i am going wrong, because with this range and formatting, SOME of the numbers are showing up #######.


Below is my formatting code. What am i missing? It seems like it formats some based on the "$#,##0.00", but it doesn't work for them all.

How do i set everything to "Currency" like in the excel options? I have tried range.NumberFormat = "Currency" but that is invalid. Any help is appreciated.

 Microsoft.Office.Interop.Excel._Application excel = new Microsoft.Office.Interop.Excel.ApplicationClass();
      Microsoft.Office.Interop.Excel.Workbook wb = (Microsoft.Office.Interop.Excel.Workbook)excel.Workbooks.Add(System.Reflection.Missing.Value);
      Microsoft.Office.Interop.Excel.Worksheet ws = (Microsoft.Office.Interop.Excel.Worksheet)wb.ActiveSheet;
      excel.DisplayAlerts = false;
      ws.Name = "CRM Inventory List";
      Microsoft.Office.Interop.Excel.Range range = ws.get_Range("H2", "H65000");
      range.NumberFormat = "$#,##0.00";







Hi all,

I don't know if this is ther right fourm for this request...

I'm developing a web site that need to edit a .xsl document and save it as PDF. For that I'm using the Miscrosoft.Office.Interop.Excel dll.

The problem is everything works fine on my workstation, but in the test environment, with the same data I got a null reference exception.

On both machines I installed Office 2007 Professional and the PIA 2010.

Anyone have an idea of what is wrong? 



Estou com o seguinte problema, estou desenvolvendo parte de uma aplicação que tem como objetivo, abrir um arquivo excel em memoria e exportar as planilhas do arquivo para o formato TXT demilitado pelo caracter TAB.

O problema que estou enfretando é o seguinte, tenho algumas colunas da planilha que precisam estar formatadas com um dos formatos(Date/Custom) com a mascara: dd/mm/yyyy.

Quando exporto o arquivo para TXT, as informações das colunas citadas acima invertem as informações de dia e mês, conforme exemplo abaixo:

Data no arquivo Excel: 04/01/2010

Data no arquivo txt gerado pela aplicação: 1/4/2010

Imagino que a aplicação está utilizando o formato americano de datas, porém já testei o CultureInfo e identifiquei que está como pt-br.

Segue abaixo o código que estou utilizando para fazer isto:

    ''' <summary>
  ''' Exporta a planilha de um arquivo Excel para o formato TXT demilitado por TAB.
  ''' </summary>
  ''' <param name="fileName">Nome completo do arquivo, exemplo: D:\My Documents\ArquivoTeste.xlsx</param>
  ''' <param name="sheetName">Nome da Planilha que será exportada.</param>
  ''' <remarks></remarks>
  Private Sub exportarExcelParaTXT(ByVal fileName As String, ByVal sheetName As String)
    Dim objExcelApp As Excel.Application = Nothing
    Dim objExcelBook As Excel.Workbook = Nothing
    Dim objExcelSheet As Excel.Worksheet = Nothing
      'NOTA: Sempre cria uma nova instancia da aplicação.
      objExcelApp = New Excel.Application()
      objExcelApp.DisplayAlerts = False

      'NOTA: Abrindo arquivo excel e planilha.  
      objExcelBook = objExcelApp.Workbooks.Open(fileName)
      objExcelSheet = CType(objExcelBook.Worksheets(sheetName), Excel.Worksheet)
      objExcelSheet.SaveAs(Replace(fileName, Path.GetExtension(fileName), " - " & sheetName & ".txt"), Excel.XlFileFormat.xlTextWindows)
    Catch ex As Exception
      MessageBox.Show("Ocorreu um erro no sistema", "Teste", MessageBoxButtons.OK, MessageBoxIcon.Error)

      If Not objExcelBook Is Nothing Then
      End If

      If Not objExcelApp Is Nothing Then
      End If

      objExcelSheet = Nothing
      objExcelBook = Nothing
      objExcelApp = Nothing
    End Try
  End Sub

Se alguem puder me ajudar, fico grato.



Cristiano Manoel




<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure