Click here to Skip to main content
15,891,749 members
Home / Discussions / C#
   

C#

 
AnswerRe: Need some tips... Sharing a collection of classes for display in a listbox? Pin
BillWoodruff7-Apr-20 0:11
professionalBillWoodruff7-Apr-20 0:11 
AnswerRe: Need some tips... Sharing a collection of classes for display in a listbox? Pin
James Curran7-Apr-20 4:36
James Curran7-Apr-20 4:36 
QuestionFlowlayoutpanel Filter Pin
lakith sandeepa3-Apr-20 20:48
lakith sandeepa3-Apr-20 20:48 
AnswerRe: Flowlayoutpanel Filter Pin
OriginalGriff3-Apr-20 21:32
mveOriginalGriff3-Apr-20 21:32 
AnswerRe: Flowlayoutpanel Filter Pin
Dave Kreskowiak4-Apr-20 4:28
mveDave Kreskowiak4-Apr-20 4:28 
QuestionTraces and Service not shown in Jaeger UI on host server used C# client (tracer) for Jaeger Pin
yuvraj vichare2-Apr-20 18:46
yuvraj vichare2-Apr-20 18:46 
AnswerRe: Traces and Service not shown in Jaeger UI on host server used C# client (tracer) for Jaeger Pin
Richard Andrew x644-Apr-20 8:46
professionalRichard Andrew x644-Apr-20 8:46 
QuestionGet names for all opened Workbook Pin
Member 133187482-Apr-20 4:52
Member 133187482-Apr-20 4:52 
Dear All,

I am beginner in C# and I am building an application to create a workbook (Book1.xlsx) then copy a specific sheet from another workbook ( Book2.xlsx ).

I created Book1 but I am trying to copy Sheet1 from Book2 but I could not.

before copying [Sheet1 from Book2 ] I am dong a kind of check to collect names for all opened workbooks so I could not be able to get names of workbooks which opened by Visual Studio c# by the below piece of code but If will open the same workbooks by myself I found the below code can get the name of opened workbooks without problem.


I don't know why.



C#
 public void CopyAsiRefSheet()
        {

 Microsoft.Office.Interop.Excel.Application XAPP;

      XAPP = (Microsoft.Office.Interop.Excel.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application");

            foreach (Microsoft.Office.Interop.Excel.Workbook WB in XAPP.Workbooks)
            {

                
                MessageBox.Show(WB.Name);

            }
}





Thanks,
Moelsayed
AnswerRe: Get names for all opened Workbook Pin
Richard MacCutchan2-Apr-20 5:50
mveRichard MacCutchan2-Apr-20 5:50 
QuestionEditor, Visualization, C# Pin
Calin Negru1-Apr-20 4:29
Calin Negru1-Apr-20 4:29 
AnswerRe: Editor, Visualization, C# Pin
#realJSOP1-Apr-20 4:51
mve#realJSOP1-Apr-20 4:51 
GeneralRe: Editor, Visualization, C# Pin
Calin Negru1-Apr-20 5:15
Calin Negru1-Apr-20 5:15 
GeneralRe: Editor, Visualization, C# Pin
Dave Kreskowiak1-Apr-20 5:29
mveDave Kreskowiak1-Apr-20 5:29 
AnswerRe: Editor, Visualization, C# Pin
Richard MacCutchan1-Apr-20 22:18
mveRichard MacCutchan1-Apr-20 22:18 
GeneralRe: Editor, Visualization, C# Pin
Calin Negru1-Apr-20 22:49
Calin Negru1-Apr-20 22:49 
QuestionEuropean Car plate recognition Pin
Member 1478897131-Mar-20 22:20
Member 1478897131-Mar-20 22:20 
AnswerRe: European Car plate recognition Pin
OriginalGriff31-Mar-20 22:42
mveOriginalGriff31-Mar-20 22:42 
QuestionMemory Management in Unit Testing Pin
User-862169531-Mar-20 19:20
User-862169531-Mar-20 19:20 
AnswerRe: Memory Management in Unit Testing Pin
Richard MacCutchan31-Mar-20 21:04
mveRichard MacCutchan31-Mar-20 21:04 
AnswerRe: Memory Management in Unit Testing Pin
Pete O'Hanlon1-Apr-20 0:24
mvePete O'Hanlon1-Apr-20 0:24 
AnswerRe: Memory Management in Unit Testing Pin
F-ES Sitecore1-Apr-20 1:38
professionalF-ES Sitecore1-Apr-20 1:38 
QuestionReference Types v. Value Types Pin
Richard Andrew x6431-Mar-20 10:52
professionalRichard Andrew x6431-Mar-20 10:52 
AnswerRe: Reference Types v. Value Types Pin
OriginalGriff31-Mar-20 11:42
mveOriginalGriff31-Mar-20 11:42 
AnswerRe: Reference Types v. Value Types Pin
BillWoodruff31-Mar-20 12:31
professionalBillWoodruff31-Mar-20 12:31 
GeneralRe: Reference Types v. Value Types Pin
Richard Andrew x6431-Mar-20 13:38
professionalRichard Andrew x6431-Mar-20 13:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.