Click here to Skip to main content
15,897,371 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestioniTextsharp vs pdfbox Pin
gavindon28-Apr-11 4:43
gavindon28-Apr-11 4:43 
AnswerRe: iTextsharp vs pdfbox Pin
Prasanta_Prince28-Apr-11 4:56
Prasanta_Prince28-Apr-11 4:56 
AnswerRe: iTextsharp vs pdfbox Pin
Pete O'Hanlon28-Apr-11 8:02
mvePete O'Hanlon28-Apr-11 8:02 
GeneralRe: iTextsharp vs pdfbox Pin
gavindon28-Apr-11 8:12
gavindon28-Apr-11 8:12 
GeneralRe: iTextsharp vs pdfbox Pin
Pete O'Hanlon28-Apr-11 8:25
mvePete O'Hanlon28-Apr-11 8:25 
GeneralRe: iTextsharp vs pdfbox Pin
gavindon28-Apr-11 8:34
gavindon28-Apr-11 8:34 
GeneralRe: iTextsharp vs pdfbox Pin
Pete O'Hanlon28-Apr-11 8:36
mvePete O'Hanlon28-Apr-11 8:36 
QuestionUnable To Create Excel Sheet At Runtime In my Application. Pin
Sanket.Patil28-Apr-11 2:37
Sanket.Patil28-Apr-11 2:37 
Hi All,

I am developing a web application. In that I have a web page that imports the data from EXCEL SHEET To Database. While doing this I have set some validation over the EXCEL Data. If the data is incorrect i need to write it in a new excel file which is created at run time. I have written the code to create new excel file with some data. But While Creating The Excel File I am Getting an error which i am unable to solve.

So, Please Help me to solve my problem.
I am using VS 2008 with c#.
The Error is :
Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space.

• To make more memory available, close workbooks or programs you no longer need.

• To free disk space, delete files you no longer need from the disk you are saving to.


The Code I have Written is :

Excel.Application WRExcel = null;
            Excel.Workbooks WRwbs = null;


            Excel._Workbook WRwb = null;
            Excel.Sheets WRss = null;

            Excel._Worksheet WRws = null;
            object objOpt = System.Reflection.Missing.Value;

            if (System.IO.File.Exists("C:\\Excel1.xls"))
            {
                //Delete The Existing Excel Sheet
                System.IO.File.Delete("C:\\Excel1.xls");
            }
            //create Excel spreadsheet

            WRExcel = new Excel.Application();

            WRwb = WRExcel.Workbooks.Add(objOpt); // My Error Occurs Here

            WRss = (Excel.Sheets)WRwb.Worksheets;

            WRws = (Excel._Worksheet)(WRss.get_Item(1));

            //create Excel column headings

            WRws.Cells[1, 1] = "Part Number.";

            WRws.Cells[1, 2] = "Kit Part.";

            WRws.Cells[1, 3] = "Description";

            WRws.Cells[1, 4] = "Reason For Reject";


            WRws.Cells[2, 1] = RowNo.Trim();

            WRws.Cells[2, 2] = ColumnNo.Trim();

            WRws.Cells[2, 3] = ErrorMsg.Trim();

            WRws.Cells[2, 4] = Filename;
            
            //save workbook

            WRwb.SaveAs("C:\\Excel1.xls", objOpt, objOpt, objOpt, objOpt, Opt,                 Excel.XlSaveAsAccessMode.xlNoChange, objOpt, objOpt, objOpt, objOpt, objOpt);

            //close workbook

            WRwbs.Close();



Please Help me to Solve My Problem.

Thanks & Regards
Sanket Patil
.

AnswerRe: Unable To Create Excel Sheet At Runtime In my Application. Pin
Prasanta_Prince28-Apr-11 3:02
Prasanta_Prince28-Apr-11 3:02 
QuestionScorm content viewer Pin
nachavle27-Apr-11 23:05
nachavle27-Apr-11 23:05 
QuestionProblem with cascading DropDownLists in a databound DetailsView Pin
kbalias27-Apr-11 21:30
kbalias27-Apr-11 21:30 
AnswerRe: Problem with cascading DropDownLists in a databound DetailsView Pin
Ali Al Omairi(Abu AlHassan)28-Apr-11 0:45
professionalAli Al Omairi(Abu AlHassan)28-Apr-11 0:45 
QuestionObjectDataSource for DevExpress ASPxGtridView with enabled paging, sorting, grouping, external filters Pin
trongood27-Apr-11 21:15
trongood27-Apr-11 21:15 
AnswerRe: ObjectDataSource for DevExpress ASPxGtridView with enabled paging, sorting, grouping, external filters Pin
Mehul Harry28-Apr-11 14:03
Mehul Harry28-Apr-11 14:03 
Questioninput validation Pin
jashimu27-Apr-11 9:38
jashimu27-Apr-11 9:38 
AnswerRe: input validation Pin
gavindon27-Apr-11 9:49
gavindon27-Apr-11 9:49 
GeneralRe: input validation Pin
jashimu27-Apr-11 10:22
jashimu27-Apr-11 10:22 
GeneralRe: input validation Pin
gavindon27-Apr-11 10:38
gavindon27-Apr-11 10:38 
GeneralRe: input validation Pin
jashimu27-Apr-11 10:51
jashimu27-Apr-11 10:51 
GeneralRe: input validation Pin
Prasanta_Prince28-Apr-11 3:06
Prasanta_Prince28-Apr-11 3:06 
GeneralRe: input validation Pin
jashimu28-Apr-11 10:32
jashimu28-Apr-11 10:32 
AnswerRe: input validation Pin
m@dhu27-Apr-11 18:59
m@dhu27-Apr-11 18:59 
QuestionDeclarative vs Programmatic: opinions Pin
Brad Tumer27-Apr-11 8:55
Brad Tumer27-Apr-11 8:55 
AnswerRe: Declarative vs Programmatic: opinions Pin
Not Active28-Apr-11 2:39
mentorNot Active28-Apr-11 2:39 
GeneralRe: Declarative vs Programmatic: opinions Pin
Prasanta_Prince28-Apr-11 3:09
Prasanta_Prince28-Apr-11 3:09 

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.