Click here to Skip to main content
15,890,438 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: asp.net Pin
rifayee1-Nov-12 19:13
rifayee1-Nov-12 19:13 
GeneralRe: asp.net Pin
R. Giskard Reventlov1-Nov-12 13:16
R. Giskard Reventlov1-Nov-12 13:16 
GeneralRe: asp.net Pin
Think On1-Nov-12 20:29
Think On1-Nov-12 20:29 
Questionwhat is different between DataAdapter.Update( ) and DataSetAcceptChange( ) in ADO.Net Pin
RKSPradeep31-Oct-12 19:58
RKSPradeep31-Oct-12 19:58 
AnswerRe: what is different between DataAdapter.Update( ) and DataSetAcceptChange( ) in ADO.Net Pin
Sandeep Mewara3-Nov-12 7:43
mveSandeep Mewara3-Nov-12 7:43 
QuestionHow to implement a component that facilitates Sftp in .net Pin
Alesha Mary Milred Fernandes31-Oct-12 19:56
Alesha Mary Milred Fernandes31-Oct-12 19:56 
AnswerRe: How to implement a component that facilitates Sftp in .net Pin
Sandeep Mewara3-Nov-12 7:46
mveSandeep Mewara3-Nov-12 7:46 
Questioncopy sheets one work book to other work book using open xml in windows azure Pin
prakashreddy1730-Oct-12 23:06
prakashreddy1730-Oct-12 23:06 
i am using open xml in .net 4.0

i want to copy the data contain in one sheet in one work book and paste into sheet different work book with sheet name, i have done this by using miscrosoft.interop.excel, i want same thing using open xml please give the solution

i have done this by using miscrosoft.interop.excel this is the following code the same thing need to be done using openxml please help me on this

Excel.Application oXL;
Excel.Workbook oWB;
Excel.Worksheet oSheet;
Excel.Range oRange;
oXL = new Excel.Application();

// // Set some properties
oXL.Visible = true;
oXL.DisplayAlerts = false
for (int iWorkbook = 0; iWorkbook < Files.Length; iWorkbook++)
{
if (Files[iWorkbook] != string.Empty)
{
oXL.Workbooks.Add(Files[iWorkbook]);
}
}
for (int i = 2; i <= oXL.Workbooks.Count; i++)
{
int count = oXL.Workbooks[i].Worksheets.Count;
oXL.Workbooks[i].Activate();

for (int j = 2; j <= count; j++)
{
Excel._Worksheet ws = (Excel._Worksheet)oXL.Workbooks[i].Worksheets[j];

ws.Select(Type.Missing);
ws.Cells.Select();
string name = ws.Name;
Excel.Range sel = (Excel.Range)oXL.Selection;
if (sel.Cells.Text != string.Empty)
{
sel.Copy(Type.Missing);
Excel._Worksheet sheet = (Excel._Worksheet)oXL.Workbooks[1].Worksheets.Add(
Type.Missing, Type.Missing, Type.Missing, Type.Missing
);

sheet.Paste(Type.Missing, Type.Missing);
sheet.Name = name;
}
}
}
string[] ConsolidatedFiles = Directory.GetFiles(filepath);

if (ConsolidatedFiles.Length > 0)
{
string filetemplates = filepath + "\\" + TemplateType + ".xlsx";
for (int file = 0; file < ConsolidatedFiles.Length; file++)
{
if (ConsolidatedFiles[file].ToString() == filetemplates)
{
File.Delete(ConsolidatedFiles[file]);
}
}
}
filepath = filepath + "\\" + TemplateType + ".xlsx";

oWB.SaveAs(filepath, Excel.XlFileFormat.xlWorkbookDefault,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Excel.XlSaveAsAccessMode.xlExclusive,
Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing);
oWB.Close(Type.Missing, Type.Missing, Type.Missing);
oWB = null;
oXL.Quit();
Questiondesign a master page Pin
RKSPradeep30-Oct-12 20:50
RKSPradeep30-Oct-12 20:50 
AnswerRe: design a master page Pin
Rahul Rajat Singh31-Oct-12 2:25
professionalRahul Rajat Singh31-Oct-12 2:25 
AnswerRe: design a master page Pin
jkirkerx31-Oct-12 7:23
professionaljkirkerx31-Oct-12 7:23 
AnswerRe: design a master page Pin
ZurdoDev5-Nov-12 5:42
professionalZurdoDev5-Nov-12 5:42 
AnswerRe: design a master page Pin
xut24477-Nov-12 14:49
xut24477-Nov-12 14:49 
Questioncopy folder on web server Pin
Jassim Rahma30-Oct-12 11:17
Jassim Rahma30-Oct-12 11:17 
AnswerRe: copy folder on web server Pin
Jassim Rahma1-Nov-12 11:09
Jassim Rahma1-Nov-12 11:09 
GeneralRe: copy folder on web server Pin
Vasudevan Deepak Kumar2-Nov-12 8:33
Vasudevan Deepak Kumar2-Nov-12 8:33 
QuestionI need to get schooled here on using parameters and the reader for Oracle Pin
jkirkerx30-Oct-12 8:31
professionaljkirkerx30-Oct-12 8:31 
AnswerRe: I need to get schooled here on using parameters and the reader for Oracle [SOLVED] Pin
jkirkerx30-Oct-12 12:07
professionaljkirkerx30-Oct-12 12:07 
AnswerRe: I need to get schooled here on using parameters and the reader for Oracle Pin
Think On1-Nov-12 4:52
Think On1-Nov-12 4:52 
GeneralRe: I need to get schooled here on using parameters and the reader for Oracle Pin
jkirkerx1-Nov-12 12:29
professionaljkirkerx1-Nov-12 12:29 
QuestionWeb Service: consume java web service in asp.net Pin
Member 394398830-Oct-12 2:25
Member 394398830-Oct-12 2:25 
QuestionDevelop Facebook application with 'asp.net', not with 'php' Pin
ThetaClear30-Oct-12 1:52
ThetaClear30-Oct-12 1:52 
AnswerRe: Develop Facebook application with 'asp.net', not with 'php' Pin
Eddy Vluggen30-Oct-12 3:26
professionalEddy Vluggen30-Oct-12 3:26 
QuestionASP REPEATER Pin
fahad.130-Oct-12 1:19
fahad.130-Oct-12 1:19 
AnswerRe: ASP REPEATER Pin
Eddy Vluggen30-Oct-12 3:28
professionalEddy Vluggen30-Oct-12 3:28 

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.