Search Results

Search found 4783 results on 192 pages for 'excel vba'.

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

  • Dataset to excel

    - by Ruben Monteiro
    Hi. I'm developing an application that as to export a dataset to excel, this dataset have 3 tables and the relation between them, I would like to export this to a single excel sheet where for each parent table there is a '+' sign that when expanded shows the child values related to it. To export a single table to excel I know how to do it, but to create this type of relation I have no idea how to do it, do I have to create a macro on the excel file?

    Read the article

  • generate excel in java

    - by chetan
    I want to generate excel with enabling auto-filter option.For that I have create one template excel file by enabling auto-filter option but when I write something into that template excel file auto-filter option disabled again. Is there any solution to create excel file by enabling auto-filter option.

    Read the article

  • Using excel as UI without VB

    - by 01
    I think every business person would like to have excel UI, however they are forced into using web applications that sometimes look like really bad excel. Are there any frameworks that help build excel ui without VB? I dont mean framework like POI or JExcel that allows you to generate excel reports.

    Read the article

  • How to read Excel file using vb.net

    - by Mark
    How to read excel file using vb.net.. I have a code to read the excel file but suddenly it crashes the output when I deleted some rows in excel file.. The deleted rows was also outputted in my coded program. Can anyone help me on how to read excel file and ignore those deleted rows to avoid unexpected null output..

    Read the article

  • Error while generating a PDF file with Excel in ASP.NET

    - by l2mt
    I have to generate an excel file and a PDF file from an asp.net application. I'm using the Interop assemblies and I can generate the excel file without any problem. But when I'm generating an pdf file with the add-in SaveAsPDFandXPS.exe I'm getting the next error: Exception HRESULT: 0x800A03EC with a debug I see the error is in the next method which is used to export de PDF file: _objWB.ExportAsFixedFormat(Excel.XlFixedFormatType.xlTypePDF, _nombreArchivo, Excel.XlFixedFormatQuality.xlQualityStandard, false, false, Type.Missing, Type.Missing, false, Type.Missing);

    Read the article

  • Printer setup via VBA in Excel

    - by Gina
    I am trying to assign a cell in Excel for the user to type the printer name where they want the print out to go and then use that value in the Application.ActivePrinter = (use the cell value) Even though I have done the programming assigning a name to the cell and using it in a variable it is giving me an error. I have set my variable as string, text, object and variant already and it's not working. Do you know what code should I use to be able to do this?

    Read the article

  • How to read excel file in vb.net 2003

    - by Mark
    Can anyone help me on how can I read the excel file using vb.net 2003? The first thing to do is to browse the excel file in my vb.net program then read the content of excel file and display the value of excel content in listview.

    Read the article

  • FTP a text file to a server using VBA in Excel

    - by Anindya
    I have an Excel worksheet where the user enters certain data, which I want to store in a text file and upload to a server using FTP. One site suggested adding a reference to "Microsoft Internet Transfer Control" and then define an "Inet" object to do the FTP. However, I am unable to find a reference with this name in "Tools - References" in the VB Editor. Does anyone know of a solution for this problem? Thanks in advance.

    Read the article

  • Excel to TextBox

    - by sukumar
    How to copy Excel data into a Textbox using C#? Excel.Worksheet wrksheet = (Excel.Worksheet)userControl11.oWB.ActiveSheet; Excel.Range range = wrksheet.UsedRange; wrksheet.Copy(this, Missing.Value); IDataObject data = Clipboard.GetDataObject(); textBox1.Text = data.GetData(DataFormats.Text).ToString(); With this above code i'm unable to achieve what i expected. Pls help me...

    Read the article

  • Launch Excel from C# and close it on "Save"

    - by MadSeb
    I want to do the following with C# and Microsoft Excel: 1 - The user chooses a file. 2 - Micorosft Excel is shown to edit that file. 3 - As soon as the user clicks Excel's "Save" button Microsoft Excel should close.The user shouldn't have to click on exit. Any idea on #3 ? Regards, Sebastian

    Read the article

  • Using SQL to join spreadsheets in excel

    - by toms
    Based on the explenation here: How do I join two worksheets in Excel as I would in SQL? I tried to join to excel sheets from different files into the same sheet. However, I keep getting this error message when I try to refresh the table: [MICROSOFT][OBDC Excel Driver] Too few parameters. Expected 5. The SQL queries i've put in so far were: SELECT `Sheet1$`.ID, `Sheet1$`.Name, `Sheet1$`.`L Name` FROM `C:\Users\Tom\Book1.xlsx`.`Sheet1$` a LEFT JOIN `C:\Users\Tom\Book2.xlsx`.`Sheet1$` b ON a.col2= b.col2 and SELECT `Sheet1$`.ID, `Sheet1$`.Name, `Sheet1$`.`L Name` FROM `C:\Users\Tom\Book1.xlsx`.`Sheet1$` a LEFT JOIN `C:\Users\Tom\Book2.xlsx`.`Sheet1$` b ON a.`ID`= b.`ID` and SELECT * FROM `C:\Users\Tom\Book1.xlsx`.`Sheet1$` a LEFT JOIN `C:\Users\Tom\Book2.xlsx`.`Sheet1$` b ON a.`ID`= b.`ID` and a few combinations and alterations. I can't seem to find the solution. I've learned that it definitely doesn't like the SELECT *. But I can't fix it. Can anyone suggest any solution?

    Read the article

  • Two large, linked Excel files take 30 minutes to save, except in VMWare environment

    - by Gerald L
    I support some tax consultants who love to use Excel when they should probably be using Access. Anyway, they have created two Excel files, A and B. File B has cells linked to file A. File A is 27 MB and file B is 16 MB. One worksheet has roughly 1 million rows and there is another worksheet doing a whole bunch of SUMIF on the 1 million rows. Not the best idea, but whatever. Both Excel files open and recalculate within a reasonable amount of time (1-2 minutes). For a files that large, this is acceptable. Here is the problem: Once you change a cell, and save the file B, it takes a solid 30 minutes to save the file, and the processors are going full speed. I've tried this on 6 different machines, all running Windows XP SP3 with Office 2007 SP2 and all patches. The specs vary from one machine with 512 MB or RAM to a machine with 4 GB of RAM and quad processors. Same result every time. Here is the clincher: If I do this same save operation on a VMWare virtual machine, the file gets saved in 1 minute. I've tried this with my ESX servers at the office, my Mac Fusion at home, and VMWare workstation at the office. It does not matter how much RAM the virtual machine has... it saves in about 1 minute every time. Does anybody have any idea why this is happening and how to fix?

    Read the article

  • How to open semicolon delimited CSV-files in US-version of Excel

    - by Holgerwa
    When I double-click on a .csv file, it is opened in Excel. The csv-files have columns delimited with semicolons (not commas, but also a valid format). Using a German Windows/Excel setup, the opened file is displayed correctly, the columns are separated where the semicolons existed in the csv-file. But when I do the same on an (US-) English Windows/Excel setup, only one column is imported, showing the whole data including the semicolons in the first column. (I don't have an English setup available for tests, users have reported the behavior) I tried to change the list separator value in Windows regional settings, but that didn't change anything. What can I do to be able to double-click-open those CSV-files on an English setup? EDIT: It seems to be the best solution not to rely on CSV-files in this case. I was hoping that there is some formatting for CSV-files that makes it possible to use them internationally. The best solution seems that I'll switch to creating XLS-files. Thanks to all for your suggestions and helpful tips!

    Read the article

  • Excel data representation: show me all people who did not pass the exam

    - by dreftymac
    Background I have an excel spreadsheet with the results of a pass/no-pass exam. Students are allowed to take the exam as often as they want until they either pass, or give up trying. student ;; result ;; date [email protected] ;; no-pass ;; 2000-06-07 [email protected] ;; pass ;; 2000-06-07 [email protected] ;; pass ;; 2000-06-07 [email protected] ;; no-pass ;; 2000-06-07 [email protected] ;; pass ;; 2000-06-07 [email protected] ;; pass ;; 2000-06-08 [email protected] ;; no-pass ;; 2000-06-08 Question Using a pivot-table or something else, how can I get excel to show me a clean report or representation of this data on another sheet that answers the question: Who are all the people who took the exam, but never got a passing grade? In the above example it would just show me [email protected] ;; no-pass ;; with all the dates that delta took the exam. I know excel is not a database nor a reporting tool per-se, but it would be great if I could get it to do this.

    Read the article

  • Formula-based Excel page headers

    - by Jake Krohn
    I'm using the "Rows to repeat at top" function in Excel's "Page Setup" dialog to ensure that a multi-row header block appears on every printed page of my worksheet. However, I'd like to be able to change certain bits of the header based on the content of the current page. I would simply like to display the value of one cell in the first row that is printed on the page. If this is my header: Section: xx And the data looks like this (columns are Section and Name): 1 Foo 1 Bar 2 Baz I want the "xx" in the header to be "1". If, further down on the next page, the value in the Section column is "3", I want that printed in the header of the next page. I originally thought that using the "OFFSET" function might help, e.g. ="Section: "&OFFSET(A2, 1, 0) But it only shows the offset from the original placement of the header, thus only working on page 1. The end document is a PDF, so right now I'm able to go back in with the "TouchUp Text Tool" in Acrobat and add the numbers page by page. But it gets to be a tedious process with 70+ page reports. Anyone have any better ideas that don't require me mucking up the original Excel document with inserted headers every N lines? This is Excel 2008 for Mac, if it makes a difference.

    Read the article

  • Advanced cell selection in Excel

    - by Supuhstar
    I am new to this flavor of StackExchange, so if this belongs elsewhere, please move it; I figured this would be the best place, though. I am making an Excel Worksheet that simply stores basic financial data in 5 columns (Check Number, Date of Transaction, Description, Profit from Transaction, and Balance After Transaction) and indefinite rows. Each worksheet represents one month, and each Workbook represents a year. As I make or receive a payment, I store it as a new row, which, inherently, makes the number of rows per month indefinite. Each transaction's Balance cell is the sum of the Balance cell of the row above it and the Profit cell of its row. I want each month to start off with a special row (first one after column headers) that displays a summary of the last month's transactions. For instance, the Balance After Transaction cell would display the last row's balance, and the Profit from Transaction cell would display the overall profits of the month) I know that if I knew every month had exactly 100 expenses, I could achieve this for March with the following formulas for profit and balance, respectively: =February!E2 - February!E102 =February!E102 However, I do NOT know how many rows will be in each month's table, and I'd like to automate this as much as possible (for instance, if I find a missed or duplicated expense in January, I don't want to have to update all the formulas that point to the ending January balance). How can I have Excel automatically use the last entered value in a column, in any given Excel spreadsheet, in a formula?

    Read the article

  • Need to search email body for regex using VBA

    - by user6620
    I am trying to write a script that I can run from a rule withing outlook. The goal of this script is to search the email body for a regex pattern, \d{8}-\d{3}\(E\d\) in this case. I want to take that pattern and see if a folder with the name of the match exists and if not create one. I am not super familiar with VBA as I write mostly in python. I have copied and pasted the following bit of code together but at this time I am unable to get the MsgBox to appear when I send an email with 20120812-001(E3) in the body. I have two different versions below. --version 2-- Sub Filter(Item As Outlook.MailItem) Dim Matches, Match Dim RegEx As New RegExp RegEx.IgnoreCase = True RegEx.Pattern = "\d{8}-\d{3}(E\d)" If RegEx.Test(Item.Body) Then MsgBox "Pattern Detected" End If End Sub --Version 1-- Sub ProcessMessage(myMail As Outlook.MailItem) Dim strID As String Dim objNS As Outlook.NameSpace Dim objMsg As Outlook.MailItem Dim objMatch As Match Dim RetStr As String Set objRegExp = New RegExp objRegExp.Pattern = "\d{8}-\d{3}\(E\d\)" objRegExp.IgnoreCase = True objRegExp.Global = True strID = myMail.EntryID Set objNS = Application.GetNamespace("MAPI") Set objMsg = objNS.GetItemFromID(strID) MsgBox objMsg.Body Set objMatch = objRegExp.Execute(objMsg.Body) MsgBox objMatch End Sub

    Read the article

  • Looping through recordset with VBA

    - by Robert
    I am trying to assign salespeople (rsSalespeople) to customers (rsCustomers) in a round-robin fashion in the following manner: Navigate to first Customer, assign the first SalesPerson to the Customer. Move to Next Customer. If rsSalesPersons is not at EOF, move to Next SalesPerson; if rsSalesPersons is at EOF, MoveFirst to loop back to the first SalesPerson. Assign this (current) SalesPerson to the (current) Customer. Repeat step 2 until rsCustomers is at EOF (EOF = True, i.e. End-Of-Recordset). It's been awhile since I dealt with VBA, so I'm a bit rusty, but here is what I have come up with, so far: Private Sub Command31_Click() 'On Error GoTo ErrHandler Dim intCustomer As Integer Dim intSalesperson As Integer Dim rsCustomers As DAO.Recordset Dim rsSalespeople As DAO.Recordset Dim strSQL As String strSQL = "SELECT CustomerID, SalespersonID FROM Customers WHERE SalespersonID Is Null" Set rsCustomers = CurrentDb.OpenRecordset(strSQL) strSQL = "SELECT SalespersonID FROM Salespeople" Set rsSalespeople = CurrentDb.OpenRecordset(strSQL) rsCustomers.MoveFirst rsSalespeople.MoveFirst Do While Not rsCustomers.EOF intCustomers = rsCustomers!CustomerID intSalesperson = rsSalespeople!SalespersonID strSQL = "UPDATE Customers SET SalespersonID = " & intSalesperson & " WHERE CustomerID = " & intCustomer DoCmd.RunSQL (strSQL) rsCustomers.MoveNext If Not rsSalespeople.EOF Then rsSalespeople.MoveNext Else rsSalespeople.MoveFirst End If Loop ExitHandler: Set rsCustomers = Nothing Set rsSalespeople = Nothing Exit Sub ErrHandler: MsgBox (Err.Description) Resume ExitHandler End Sub My tables are defined like so: Customers --CustomerID --Name --SalespersonID Salespeople --SalespersonID --Name With ten customers and 5 salespeople, my intended result would like like: CustomerID--Name--SalespersonID 1---A---1 2---B---2 3---C---3 4---D---4 5---E---5 6---F---1 7---G---2 8---H---3 9---I---4 10---J---5 The above code works for the intitial loop through the Salespeople recordset, but errors out when the end of the recordset is found. Regardless of the EOF, it appears it still tries to execute the rsSalespeople.MoveFirst command. Am I not checking for the rsSalespeople.EOF properly? Any ideas to get this code to work?

    Read the article

  • Create bookmark into 1st column of MSWord table

    - by MikeD
    Hello All, does anyone have a VBA code to create a bookmark into the first column of an MSWord table? Let's say I have a table looking like this .-----.----------------. . ref . Title . .-----.----------------. . 1 . Title 1 . .-----.----------------. . 2 . Title 2 . .-----.----------------. . foo . Title 3 . .-----.----------------. . bar . Title 4 . .-----.----------------. and I want a VBA code fragment that creates a bookmark named "T1_1" on the string "1" in row 2 / column 1, and bookmarks named "T1_2", "T1_foo" and "T1_bar" on the strings in the other cells of column 1. I don't mind to hardcode the prefix "T1" (and substitute for other tables each time). I don't mind to select tables before running the macro, I don't mind giving those cells a special format, and I don't mind to get a superfluous bookmark "T1_ref" from the first row - so the code doesn't need to distinguish between table title and table row. Thanks a lot in advance

    Read the article

  • Pivot table not refreshing sort order

    - by William Anthony
    I have Pivot Table that get its data source from another sheet, same workbook. I want the sort order of data is same as the data source order, I choose "Sort in data source order" in Pivot Table option. The problem is, when I change the data order on data source worksheet, then I refresh the Pivot Table, the sort order didn't change. I googled that the Pivot Table should be unlink first then re-link again in order to work properly, so I tried the following: The original data source has named range: origdata. The fake data source has names range: dummydata I changed manually data source to dummydata then changed back to origdata. The sort order did change as expected. Now I want to make the operation automated, so I'm using this code in Worksheet.activate event. Note that, PT is PivotTable instance. ... PT.SourceData = "dummydata" PT.RefreshTable PT.SourceData = "origdata" PT.RefreshTable ... Change data source from VBA didn't change the sort order just like I did with manual method. Why is that? Am I missing something? Maybe there are some routine called when I changed the data source manually via toolbar button? Thanks in advance for your help.

    Read the article

  • Run-time error 459 when using WithEvents with a class that implements another

    - by Ken Keenan
    I am developing a VBA project in Word and have encountered a problem with handling events when using a class that implements another. I define an empty class, IMyInterface: Public Sub Xyz() End Sub Public Event SomeEvent() And a class, MyClass that implements the above: Implements IMyInterface Public Event SomeEvent() Public Sub Xyz() ' ... code ... RaiseEvent SomeEvent End Sub Private Sub IMyInterface_Xyz() Xyz End Sub If I create a third class, OtherClass, that declares a member variable with the type of the interface class: Private WithEvents mMy As IMyInterface and try to initialize this variable with an instance of the implementing class: Set mMy = New MyClass I get a run-time error '459': This component doesn't support this set of events. The MSDN page for this error message states: "You tried to use a WithEvents variable with a component that can't work as an event source for the specified set of events. For example, you may be sinking events of an object, then create another object that Implements the first object. Although you might think you could sink the events from the implemented object, that isn't automatically the case. Implements only implements an interface for methods and properties." The above pretty much sums up what I'm trying to do. The wording, "that isn't automatically the case", rather than "this is flat-out impossible", seems to suggest that there is some bit of manual work I need to do to get it to work, but it doesn't tell me what! Does anybody know if this is possible in VBA?

    Read the article

  • How can I specify processor affinity?

    - by BenAlabaster
    I have an application that's having some trouble handling multi-processor systems. It's not an app that I have a particular affection for modifying and would like to avoid it if possible. However, I'm not above modifying the code if I have to. The application is written in VBA (and hence my inclination to avoid touching it). We've noticed that the application seems to run pretty smoothly if we set the processor affinity to a single processor using task manager, only manifesting instability when processor affinity isn't set. I know that I can specify the processor affinity of a task using .NET and as such, there lies a possibility of me writing a shell application that could be used to run legacy applications with a specified processor affinity, does anyone have any experience with this and can throw out some ideas as to headaches I'm likely to run into with this approach? The other question is: Is it in fact possible to modify the core VBA product to handle its own processor affinity? I've never had to handle this with any of my applications natively so this (at this point in time) is completely outside my realm of expertise. Thanks in advance

    Read the article

  • Accessing an Access DB from Outlook via VBA

    - by camastanta
    Hi The situation: In Outlook I get a message from a server. The content of the message needs to be put into an Access db. But, there may not exist another message with the same date. So, I need to look into a db if there is already a message with the same date and time. If there exists one, then it needs to be replaced and otherwise the message needs to be added to the database. The database contains a list of current positions from the vehicles on the road. The problem: I have problems to compare a date time with a date time in an Access DB via VBA. The query I use returns no records but there is a record in the database. This is the query I use: adoRS.Open "SELECT * FROM currentpositions WHERE ((currentpositions. [dateLT])=" & "#" & date_from_message & "#" & ")", adoConn, adOpenStatic, adLockOptimistic Second I need to now what the result is of that query. How can I determine the number of records that my query gives me? Thanks camastanta

    Read the article

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