Search Results

Search found 7183 results on 288 pages for 'export to excel'.

Page 37/288 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • What is an alternative to ADO.NET, but elegant way in C# to read Excel files

    - by Khnle
    ADO.NET just fails miserably when it's used to read Excel files where a column contains mixed data types. It appears that it tries to determine the data type of a column, and then assume the rest of the entire column is of the same data type. Here are some backgrounds: http://stackoverflow.com/questions/2968111/how-to-prevent-ado-net-from-altering-double-values-when-it-reads-from-excel-files http://blog.lab49.com/archives/196 What is an alternative approach that doesn't require automation, Excel to be co-installed, is simple (since the input excel file will only have one worksheet in each file).

    Read the article

  • How to access Excel Max Column value?

    - by Phsika
    i try to create table from excel rows. however; excel columns : column1 has max 200 character row column2 has max 300 character row column3 has max 500 character row So i need to create sql create MyTable column3 nvarchar(500) according to Excel Max Character.

    Read the article

  • C# app that uses Excel Interop, easy switch between 2003 2007?

    - by user320781
    I have an app written that just does really basic I/O on a spreadsheet. Read in a bunch of cells, do some sorting, and dump the output back into another spreadsheet. Works great on my machine. I have Office 2003 installed. When it runs on someone elses machine with 2007, it bombs, presumably due to the different versions of the Interop assemblies. I was hoping someone knew a way to dynamically change which/where the assembly is loaded from depending on the office version (getting the office version is easy from the registry). Sifting thru the rest of the internet, i didnt see anything to indicate that was possible :( . I tried installing the 2007 PIAs, but when i try to add a reference, they dont show up and i have no idea where to browse for them (they arent in the c:\windows\assemblies\; maybe the install didnt work). Am I going to have to get a machine with 2007 installed to build on every time i need to make updates?

    Read the article

  • What are the Limitations for Connecting to an Access Query in Excel

    - by thornomad
    I have an Access 2007 database that has a number of tables, some are fairly large (100,000+ records); I have created a union query to pull some of the same types of data from multiple tables into one large query for pivot table manipulation and reporting. For example: SELECT Language FROM Table1 UNION ALL SELECT Language FROM Table2 UNION ALL SELECT Language FROM Table3; This works. I found, quickly, however, that a union query will not show up when connecting to the datasource from Excel 2007. So, I created a second query to reference the union query. Like so: SELECT * FROM [The Above Union Query]; This query works and it, initially, was accessible from Excel. Time passed, I've added more data. Suddenly, when I connect to my Access database from Excel my query referencing the union has disappeared. MS Access shows no signs of an issue (data displays in Access) and my other non-union queries are showing up in Excel 2007 ... but not the one that references the union. What could be going on? Why did it disappear? I noticed if I switch some of the referenced tables in the union query to a smaller table (with less rows) all of sudden the query appears in Excel again. At least, I think that's what the difference is. I really can't put my finger on why some of the union queries won't show up and some will. Am stumped and need some guidance. Thanks.

    Read the article

  • Reduce the file size of Excel

    - by Ram
    Hi, I'm working in an excel application and providing a menu to the user to add a new worksheet in that excel application (Excel Workbook). The worksheet will be added once the user clicks the "OK" button and I'm using a template to add this worksheet (The template has lot of formatting and formulas in it) Lets say the file size is 10 MB after adding a worksheet if the workbook is saved. Then I close the Excel application and reopen it and save the file then the file size is getting reduced to 8 MB. Can anybody let me know what could be the reason for the same? Thanks, Ram

    Read the article

  • In Excel 2010, how can I show a count of occurrences on a specific date within multiple time ranges?

    - by Justin
    Here's what I'm trying to do. I have three columns of data. ID, Date(MM/DD/YY), Time(00:00). I need to create a chart or table that shows the number of occurrences on, say, 12/10/2010 between 00:00 and 00:59, 1:00 and 1:59, etc, for each hour of the day. I can do countif and get results for the date, but I cannot figure out how to show a summary of the count of occurrences per hour for the 24 hour period. I have months of data and many times each day. Example of data set is below. Any help is greatly ID Date Time 221 12/10/2010 00:01 223 12/10/2010 00:45 227 12/10/2010 01:13 334 12/11/2010 14:45 I would like the results to read: Date Time Count 12/10/2010 00:00AM - 00:59AM 2 12/10/2010 01:00AM - 01:59AM 1 12/10/2010 02:00AM - 02:59AM 0 ......(continues for every hour of the day) 12/11/2010 00:00AM - 00:59AM 0 ......... 12/11/2010 14:00PM - 14:59PM 1 And so on. Sorry for the length but I wanted to be clear. EDIT Here is a sample spreadsheet. Very little data, but I couldn't figure out a better way without having a huge file. Tested in notepad for formatting and worked ok on import as csv. PID,Date,Time 2888759,12/10/2010,0:10 2888760,12/10/2010,0:10 2888761,12/10/2010,0:10 2888762,12/10/2010,0:11 2889078,12/10/2010,15:45 2889079,12/10/2010,15:57 2889080,12/10/2010,15:57 2889081,12/10/2010,15:58 2889082,12/10/2010,16:10 2889083,12/10/2010,16:11 2889084,12/10/2010,16:11 2889085,12/10/2010,16:12 2889086,12/10/2010,16:12 2889087,12/10/2010,16:12 2889088,12/10/2010,16:13 2891529,12/14/2010,16:21

    Read the article

  • Query with UDF works in Access but gives Undefined function in expression (Err 3085) in Excel

    - by ronwest
    I have an Access table with a date/time field. I wanted to make a composite Key field out of the date/time field and 3 other text fields in the same format as the matching Key field in another database. So I concatenated the 3 text fields and wrote a User-Defined-Function in a Module to output the date field as a string in the format "YYYYMMDD". Public Function YYYYMMDD(dteDate As Date) As String YYYYMMDD = Format(dteDate, "YYYYMMDD") End Function I can then successfully run my queries in Access and it all works fine. But when I set up some DAO code in Excel and try to run the query that works fine within Access... db.Execute "qryMake_tblValsDailyAccount" ...Excel gives me the "Undefined function in expression. (Error 3085)" error. To me this is a bug in Excel and/or Access, because the (Excel) client shouldn't need to know anything about the internal calculations that normally take place perfectly in the (Access) server when in isolation. Excel should send the querydef (name with no parameters) to the server, let the server do its work then receive the answers. Why does it need to get involved with a function internal to the server? Does anyone know a way around this?

    Read the article

  • why this with excel sheet reading?

    - by Lalit
    Hi, I am reading the excel sheet from c# interop services cell by cell. where as my excel sheet have Date cells. It generates some double values , I am converting them in date by : double dbl = Convert.ToDouble(((Excel.Range)worksheet.Cells[iRowindex, colIndex_q17]).Value2); string strDate3 = DateTime.FromOADate(dbl).ToShortDateString(); drRow[dtSourceEXLData.Columns[constants.VisualDate]] = strDate3; ok? but some time happening the value of ((Excel.Range)worksheet.Cells[iRowindex,colIndex_q17]).Value2 getting date formate.why this is happeing? plaease guide me. it throws excepion of "input string not in correct format".why it is not generating double value like other cell of same column?

    Read the article

  • Writing string, numeric data to Excel via C# works, but Excel does not treat numeric data correctly

    - by Chapax
    Hi, I'm getting result sets from Sybase that I return to a C# client. I use the below function to write the result set data to Excel: ***private static void WriteData(Excel.Worksheet worksheet, string cellRef, ref string[,] data) { Excel.Range range = worksheet.get_Range(cellRef, Missing.Value); if (data.GetLength(0) != 0) { range = range.get_Resize(data.GetLength(0), data.GetLength(1)); range.set_Value(Missing.Value, data); } }* The data gets written correctly. The issue is that since I'm using string array to write data (which is a mixture of strings and floats), Excel highlights every cell that contains numeric data with the message "Number Stored as Text". How do I get rid of this issue? Many thanks, Chapax

    Read the article

  • MySQL for Excel 1.1.0 GA has been released

    - by Javier Treviño
    The MySQL Windows Experience Team is proud to announce the release of MySQL for Excel version 1.1.0 GA, one of our newest products contained in the MySQL Installer suite. You can download it from our official Downloads page at http://dev.mysql.com/downloads/installer/. The 1.1.0 release of MySQL for Excel introduces the following features: Edit MySQL Data. Edit MySQL Data This may be the coolest feature so far; users will be able to edit the data in a MySQL table using MS Excel in a very friendly and intuitive way.  Edit Data supports inserting new rows, deleting existing rows and updating existing data as easy as playing with data in an Excel’s spreadsheet and pushing changes back to the server.  Also this version contains the following bug fixes: Enabled the following checkboxes in the Append Data's Advanced Options dialog and added code in the Append Data dialog to use the checkboxes as follows: Automatically store the column mapping for the given table     If checked the current mapping will be stored automatically after clicking the Append button if the append operation is successful and there is no mapping for the current connection.schema.table already; the new mapping is stored with a proposed name of Mapping. Reload stored column mapping for the selected table automatically     If checked the first Stored Mapping found where all column names in the source grid match all column names in the target grid is automatically selected and applied when the Append Data dialog is loaded. Fixed code in Append Data that applies a stored column mapping to skip target columns where the associated mapping is empty (saved as a -1). Enclosed the Add-In's startup code in a try-catch block in order to log any possible error thrown during startup; and added information messages to the log at the beginning of the Add-In's startup code and at the end of the shutdown code.  Also changed the wrapper method that calls the MySQLUtility to write messages to the log to make logging easier, thus changed the log call throughout all the code that contains a try-catch block. Added code to the main wix configuration file to check if a newer version is already installed and if so abort the installation Fixed code to refresh the Import Procedure Form's preview grid's data source to repaint its contents every time the Call button is pressed. Added code to re-pull connections after connections are migrated from Excel to Workbench. Fixed code so when the Append Data's Automatic Mapping is performed any subsequent change on a mapping resets the mapping to a Manual Mapping. Added code to the InfoDialog class to set the button text to "Show Details" or "Hide Details" depending on the status of the Details text container. Fixed a GUID in the main wix configuration file so now previous versions are uninstalled during a new installation. Added an option to the Export Data's Advanced Options dialog to remove columns with no data, by default the Export Dialog will only flag those columns as Excluded. Added code to display a warning and paint a column red if the column name in the Export Data dialog is not set, display a warning if the table name is not set, and stack warnings but not display them if a column is Excluded, warnings are displayed normally for columns if they are not Excluded anymore.  Added code to prevent the Append and Export of Data if more than 1 selection is made (selecting more than 1 area holding the Ctrl key while selecting Excel cells). Fixed problem that prevented MySQL for Excel from loading when Display settings in Windows 7 is set to Adjust to Best Performance (Oracle bug 14521405 - UNHANDLED EXCEPTION IS THROWN WHEN LOADING MYSQL FOR EXCEL). Fixed code that renames the auto-generated Primary Key column when the Table name changes since it was not detecting if a column with the same name already existed in the table. The column duplication was not actually happening, it looked that way because the automatically generated PK column was not detecting a column had that same name. Fixed code in Export Data dialog to always set an empty string instead of null to the MySQLDataColumn properties that stores MySQL data types (MySQLDataType, RowsFrom1stDataType and RowsFrom2ndDataType). Added code to display a warning and color red a column which Data Type has not been set by the user or has been manually cleared. Added code to output to the application log exception messages consistently in all places where exceptions are catched. A series of blog posts explaining the new Edit MySQL Data feature and the other existing features are coming in this blog. You can access the MySQL for Excel documentation at http://dev.mysql.com/doc/refman/5.5/en/mysql-for-excel.html You can also post questions on our MySQL for Excel forum found at http://forums.mysql.com/. You can also post questions on our MySQL for Excel forum found at http://forums.mysql.com/. Enjoy and thanks for the support!

    Read the article

  • How can I turn off calculated columns in an Excel table from a macro using VBA? [migrated]

    - by user41293
    I am working on a macro that inserts formulas into a cell in an Excel table. The Excel table does the automatic filling of columns and fills all the cells in that column with the formula, but all I want is one cell to have the formula. I cannot just turn off automatic formula for tables as I need to have other people use this worksheet on their systems. Is there a way to turn off the automatic filling of formulas in a table using VBA in a macro? It just needs to be temporary: I just want to turn it off, put in my formulas, then turn it back on.

    Read the article

  • What are some non-MS languages that can write xlsx (Excel 2007+) documents efficiently?

    - by Honus Wagner
    Unfortunately, Excel format is required for the project I am working on. I have no problems getting the data I need in objects and arrays, and currently PHPExcel is doing handling the document generation. It works, but it's slow and loopy. Was wondering if there is a more efficient server language to generate Excel documents (not CSVs). This is a pure Linux environment so I need to stay away from .NET. I am open to any programming language that does it cleanly and efficiently. Thanks.

    Read the article

  • Microsoft Excel: How to find the minimum value? [closed]

    - by Sub Tuts
    I apologies if I post this question in the wrong place. I have a column A with names. For each name, I have a column B, it figures stand between 3 and 10 (eg 3.3 5.4 6.3 7.7). In a column C is then another number, which ranges from a "0" to " 60". Now I want to find out what is the minimum value in column B, but only, where the value in column C between 30 and 45. Does anyone happen to know how I have to type this in Excel? I've already found a lot on the Internet, but none of the suggestions there exactly "fit" to my problem ... I use Excel 2010. Any help is appreciated. Karar

    Read the article

  • In Excel format number with optional decimal places

    - by Ray
    Simple: I have numbers in cells in excel. I want the numbers formatted so that if they have decimal places they show to a maximum of 2DP and if they have no decimal places it doesn't show any. For example. 15 should be formatted as 15 NOT 15.00 14.3453453 should be formatted as 14.35 12.1 should be formatted as 12.1 0 should be formatted as 0 The closest custom format code I've come up with is 0.##. Unfortunately this formats 15.00 as 15. (note the extra decimal place). Edit: To further complicate the issues, the spreadsheet is a result of an export from SQL Server Reporting Services. So no macros are possible. Oh well, it looks like 0.## is my best bet, and they can just live with the extra period.

    Read the article

  • MySQL – Export the Resultset to CSV file

    - by Pinal Dave
    In SQL Server, you can use BCP command to export the result set to a csv file. In MySQL too, You can export data from a table or result set as a csv file in many methods. Here are two methods. Method 1 : Make use of Work Bench If you are using Work Bench as a querying tool, you can make use of it’s Export option in the result window. Run the following code in Work Bench SELECT db_names FROM mysql_testing; The result will be shown in the result windows. There is an option called “File”. Click on it and it will prompt you a window to save the result set (Screen shot attached to show how file option can be used). Choose the directory and type out the name of the file. Method 2 : Make use of OUTFILE command You can do the export using a query with OUTFILE command as shown below SELECT db_names FROM mysql_testing INTO OUTFILE 'C:/testing.csv' FIELDS ENCLOSED BY '"' TERMINATED BY ';' ESCAPED BY '"' LINES TERMINATED BY '\r\n'; After the execution of the above code, you can find a file named testing.csv in C drive of the server. Reference: Pinal Dave (http://blog.sqlauthority.com)Filed under: MySQL, PostADay, SQL, SQL Authority, SQL Query, SQL Tips and Tricks, T SQL Tagged: CSV

    Read the article

  • Export value from Excel worksheet to Access record

    - by glinch
    Hi there, I have an excel spreadsheet that contains the primarky-key/id value for a record in a table in an access database. I would like to export specific data from certain cells in the spreadsheet to certain fields in the corresponding record in the table. Is this possible, any help would be greatly appreciated. Many thanks Noel

    Read the article

  • Excel VBA Application.OnTime. I think its a bad idea to use this... thoughts either way?

    - by FinancialRadDeveloper
    I have a number of users I support that are asking for things to happen automatically ( well more automagically but that's another point!). One want events to happen every 120 secs ( see my other question ) and also another wants 1 thing to happen say at 5pm each business day. This has to be on the Excel sheet so therefore VBA as addins etc will be a no no, as it needs to be self contained. I have a big dislike of using Application.OnTime I think its dangerous and unreliable, what does everyone else think?

    Read the article

  • Exporting WPF DataGrid to a text file in a nice looking format. Text file must be easy to read.

    - by Andrew
    Hi, Is there a simple way to export a WPF DataGrid to a text file and a .csv file? I've done some searching and can't see that there is a simple DataGrid method to do so. I have got something working (barely) by making use of the ItemsSource of the DataGrid. In my case, this is an array of structs. I do something with StreamWriters and StringBuilders (details available) and basically have: StringBuilder destination = new StringBuilder(); destination.Append(row.CreationDate); destination.Append(seperator); // seperator is '\t' or ',' for csv file destination.Append(row.ProcId); destination.Append(seperator); destination.Append(row.PartNumber); destination.Append(seperator); I do this for each struct in the array (in a loop). This works fine. The problem is that it's not easy to read the text file. The data can be of different lengths within the same column. I'd like to see something like: 2007-03-03 234238423823 823829923 2007-03-03 66 99 And of course, I get something like: 2007-03-03 234238423823 823829923 2007-03-03 66 99 It's not surprising giving that I'm using Tab delimiters, but I hope to do better. It certainly is easy to read in the DataGrid! I could of course have some logic to pad short values with spaces, but that seems quite messy. I thought there might be a better way. I also have a feeling that this is a common problem and one that has probably been solved before (hopefully within the .NET classes themselves). Thanks.

    Read the article

  • Problem with LINQ Generated class and IEnumerable to Excel

    - by mehmet6parmak
    Hi all, I wrote a method which exports values to excel file from an IEnumerable parameter. Method worked fine for my little test class and i was happy till i test my method with a LINQ class. Method: public static void IEnumerableToExcel<T>(IEnumerable<T> data, HttpResponse Response) { Response.Clear(); Response.ContentEncoding = System.Text.Encoding.Default; Response.Charset = "windows-1254"; // set MIME type to be Excel file. Response.ContentType = "application/vnd.ms-excel;charset=windows-1254"; // add a header to response to force download (specifying filename) Response.AddHeader("Content-Disposition", "attachment;filename=\"ResultFile.xls\""); Type typeOfT = typeof(T); List<string> result = new List<string>(); FieldInfo[] fields = typeOfT.GetFields(); foreach (FieldInfo info in fields) { result.Add(info.Name); } Response.Write(String.Join("\t", result.ToArray()) + "\n"); foreach (T t in data) { result.Clear(); foreach (FieldInfo f in fields) result.Add((typeOfT).GetField(f.Name).GetValue(t).ToString()); Response.Write(String.Join("\t", result.ToArray()) + "\n"); } Response.End(); } My Little Test Class: public class Mehmet { public string FirstName; public string LastName; } Two Usage: Success: Mehmet newMehmet = new Mehmet(); newMehmet.FirstName = "Mehmet"; newMehmet.LastName = "Altiparmak"; List<Mehmet> list = new List<Mehmet>(); list.Add(newMehmet); DeveloperUtility.Export.IEnumerableToExcel<Mehmet>(list, Response); Fail: ExtranetDataContext db = new ExtranetDataContext(); DeveloperUtility.Export.IEnumerableToExcel<User>(db.Users, Response); Fail Reason: When the code reaches the code block used to get the fields of the template(T), it can not find any field for the LINQ Generated User class. For my weird class it works fine. Why? Thanks...

    Read the article

  • iPhone - Open excel from SSRS 2008

    - by milesmcgehee
    We're currently having a problem with our 2008 SSRS server sending excel reports to users with iPhones. They get the email with no problems, but when the XLS file is opened on the phone, it returns an error of: Invalid format. Everyone else can open the report with no problems (email/blackberry) The odd thing, is I can drag the file to my desktop from the message, open it, save it, and then email it again and it opens just fine on the phone. Does anyone know of hotfix that can be applied to the SSRS server to create the XLS files correctly? Or something I can change to make this work? I know we can send all the attachments in PDF but I'd like to keep them XLS if at all possible.

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >