Search Results

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

Page 22/192 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • what does this ADO OPEN Method do?

    - by every_answer_gets_a_point
    in plain english can you explain to me what happens here: rs.Open "batchinfo", oConn, adOpenKeyset, adLockOptimistic, adCmdTable what i need to do is to be able to insert values into a table called batchinfo. would this be the best way to do an OPEN? the only thing i would be doing is inserting values.

    Read the article

  • Parameterize Charts using Excel Slicers in PowerPivot

    - by Marco Russo (SQLBI)
    One new nice feature of Excel 2010 is the Slicer. Usually, slicers are used to filter data in a PivotTable. But they might be also useful to parameterize an algorithm or a chart! We discussed this technique in our book , but Alberto Ferrari wrote a post that shows how to use this technique to allow the user to select two stocks that should be compared in an Excel Chart – as you might imagine, this will work also when you will publish the workbook on SharePoint! This is the result: Nice to see that...(read more)

    Read the article

  • Parameterize Charts using Excel Slicers in PowerPivot

    - by Marco Russo (SQLBI)
    One new nice feature of Excel 2010 is the Slicer. Usually, slicers are used to filter data in a PivotTable. But they might be also useful to parameterize an algorithm or a chart! We discussed this technique in our book , but Alberto Ferrari wrote a post that shows how to use this technique to allow the user to select two stocks that should be compared in an Excel Chart – as you might imagine, this will work also when you will publish the workbook on SharePoint! This is the result: Nice to see that...(read more)

    Read the article

  • Excel 2010: How to color the area between charts?

    - by Quasdunk
    Hello, I asked this question already on stackoverflow but it hasn't been answered yet. Instead I was advised to try it here, so here I go :) So there's that simple XY-Line-Chart in Excel (2010). It is surrounded by two other graphs which are parallel but offset by the same factor in both the positive and negative direction - something like this: ---------------- (positively offset parallel graph) ---------------- (main graph) ---------------- (negatively offset parallel graph) Now I want to color the space between the main graph and the offset ones, but I just can't seem to find a way! Is it maybe possible with VBA? Or is there maybe a solution for Excel 2007?

    Read the article

  • save a cfdocument as an excel file

    - by Winter
    is there a workaround to use the cfdocument tag to save a page/file as an excel sheet instead of a PDF file? I already have a process set up to make pdf files and email them out and would like to give my customers the option of getting an excel file instead. It would be nice if I could reuse the code I already have instead of having to rewrite it in POI or something like that.

    Read the article

  • Weird Excel bar disgram behaviour

    - by Simon
    Hi I have a very simple question. I wanna have a diagram with the following table Apple 30 40 50 Pears 200 300 400 Bananas 10 20 30 The weird thing, when I try to draw a bar diagram the order of the bars change. So Excel draws me first the Bananas, the the pears and finally the apple bar... Is there anyway to tell Excel 2003 that it keeps the order? Thank you very much

    Read the article

  • Generate table schema inspecting Excel(CSV) and import data

    - by Frank Malina
    How would I go around creating a MYSQL table schema inspecting an Excel(or CSV) file. Are there any ready Python libraries for the task? Column headers would be sanitized to column names. Datatype would be estimated based on the contents of the spreadsheet column. When done, data would be loaded to the table. I have an Excel file of ~200 columns that I want to start normalizing.

    Read the article

  • C# exporting e-mails to excel on widndows forms using microsoft.office.interop.excel

    - by shin
    I need to export some data to excel in my forms aplication, so i used microsoft.office.interop.excel and everything is ok except one thing. When exporting client's email I would like to make it an mailto: link. excellApp.Cells[row, 16] = "mailto:"+client.Email; doesn't work Whend I add hiperlink when exporting www field it looks like this: excelWorkSheet.Hyperlinks.Add(excellApp.Cells[row, 14], client.Www, Type.Missing, Type.Missing, Type.Missing); How can I export an email to have similar effect coz right now I have only simple fields withou any action...?

    Read the article

  • Neophyte question about using Subtotal and CountIf in Excel

    - by Andrew
    Hi, I'm using Excel and having some problems with Countif and I don't understand how it works differently from SubTotal. I used the GUI to subtotal stuff and all the subtotals are right. Then I attempted to use the Countif to see how many requirements passed. That worked for the first subtotal only. It's easy to see why. When I look at the box for the subtotal, it says: =SUBTOTAL(3,C286:C292) When I look at my formula for passed requirements, I have: =IF(ISTEXT(A285),COUNTIF(C286:C338,"=Passed"),"") Notice that the last column is wrong. How did the Subtotal manage to keep this correct? I typed in the formula for passed requirements and dragged it down the page. Everything behaved as expected (even the bit about ISTEXT dutifully figured out which row was which), but it got the last row wrong. Any ideas? SRS Maintenance Count 7 44 SRS Maintenance Passed SRS Maintenance Passed SRS Maintenance Passed SRS Maintenance Passed SRS Maintenance Passed SRS Maintenance Passed SRS Maintenance Passed SRS Reports Count 12 43 SRS Reports Passed SRS Reports Passed SRS Reports Passed SRS Reports Passed SRS Reports Failed SRS Reports Passed SRS Reports Passed SRS Reports Failed SRS Reports Passed SRS Reports Passed SRS Reports Failed

    Read the article

  • Changing Positions of the Chart When Creating Multiple Charts Automatically via Vbasic in Excel 2007

    - by McVey
    I am creating a new chart for each row of data in an Excel spreadsheet. I have the Vbasic working properly, but I want to change the position of the chart on the sheet that is added for each row. Below is my code, what do I need to do to change the position of the chart on the page automatically? Ideally, I would like it to be in the upper left hand corner of each sheet. Sub DrawCharts() Dim Ws As Worksheet Dim NewWs As Worksheet Dim cht As Chart Dim LastRow As Long Dim CurrRow As Long Set Ws = ThisWorkbook.Worksheets("Sheet1") LastRow = Ws.Range("A65536").End(xlUp).Row For CurrRow = 2 To LastRow Set NewWs = ThisWorkbook.Worksheets.Add NewWs.Name = Ws.Range("A" & CurrRow).Value Set cht = ThisWorkbook.Charts.Add With cht .ChartType = xl3DColumnClustered .SeriesCollection.NewSeries .SeriesCollection(1).Values = "=" & Ws.Name & "!R" & CurrRow & "C3:R" & CurrRow & "C8" .SeriesCollection(1).Name = "=" & Ws.Name & "!R" & CurrRow & "C2" .SeriesCollection(1).XValues = "Sheet1!R1C3:R1C8" .Axes(xlValue).MinimumScale = 0 .Axes(xlValue).MaximumScale = 1 .Axes(xlValue).MajorUnit = 0.2 .SetElement (msoElementDataLabelShow) .SetElement (msoElementLegendNone) .Location Where:=xlLocationAsObject, Name:=NewWs.Name End With Next CurrRow End Sub Any help is appreciated.

    Read the article

  • Excel: Automating the Selection of an Unknown Number of Cells

    - by user1905080
    I’m trying to automate the formatting of an excel file by a macro and am seeking a solution. I have two columns titled Last Name and First Name which I would like to concatenate into a separate column titled Last Name, First Name. This is simple enough when done by hand: create one cell which does this, then drag that cell to include all cells within the range. The problem appears when trying to automate this. Because I can’t know the number of names that need to be concatenated ahead of time, I can’t automate the selection of cells by dragging. Can you help me automate this? I’ve tried a process of copying the initial concatenated cell, highlighting the column, and then pasting. I’ve also tried to use a formula which returned the concatenation only if there is text in the “Last Name” and “First Name” columns. However, in both cases, I end up with some 100,000 rows, putting a serious cramp on my ability to manipulate the worksheet. The best solution I can think of is to create concatenations within a fixed range of cells. Although this would create useless cells, at least there wouldn’t be 99,900 of them.

    Read the article

  • excel:mysql: rs.Update not working

    - by every_answer_gets_a_point
    i am updating a table using an ODBC connection from excel to mysql unfortunately the only column that gets updated is this one: .Fields("instrument") = "NA" where i am assigning variables to .Fields, it is putting NULL values!! what is going on here? here's the code Option Explicit Dim oConn As ADODB.Connection Private Sub ConnectDB() Set oConn = New ADODB.Connection oConn.Open "DRIVER={MySQL ODBC 5.1 Driver};" & _ "SERVER=localhost;" & _ "DATABASE=employees;" & _ "USER=root;" & _ "PASSWORD=pas;" & _ "Option=3" End Sub Function esc(txt As String) esc = Trim(Replace(txt, "'", "\'")) End Function Private Sub InsertData() Dim dpath, atime, rtime, lcalib, aname, rname, bstate, instrument As String Dim rs As ADODB.Recordset Set rs = New ADODB.Recordset ConnectDB With wsBooks rs.Open "batchinfo", oConn, adOpenKeyset, adLockOptimistic, adCmdTable Worksheets.Item("Report 1").Select dpath = Trim(Range("B2").Text) atime = Trim(Range("B3").Text) rtime = Trim(Range("B4").Text) lcalib = Trim(Range("B5").Text) aname = Trim(Range("B6").Text) rname = Trim(Range("B7").Text) bstate = Trim(Range("B8").Text) ' instrument = GetInstrFromXML(wbBook.FullName) With rs .AddNew ' create a new record ' add values to each field in the record .Fields("datapath") = dpath .Fields("analysistime") = atime .Fields("reporttime") = rtime .Fields("lastcalib") = lcalib .Fields("analystname") = aname .Fields("reportname") = rname .Fields("batchstate") = bstate .Fields("instrument") = "NA" .Update ' stores the new record End With ' get the last id Set rs = oConn.Execute("SELECT @@identity", , adCmdText) 'MsgBox capture_id rs.Close Set rs = Nothing End With End Sub

    Read the article

  • Help to bypass password for sample projects of excel.

    - by Munna
    Hello Friend.. I am doing project in EXCEL VBA. i am taking refernce of some projects made in excel vba. But when I trid to open that excel sample projects, it ask me for password. so how can bypass password for that excel project so i can take refrence so that i can take refrence of sample. Please help....

    Read the article

  • How do I get my macro to stop if i cancel save a copy

    - by total newbie
    Greetings one and all - a christmas puzzle for anyone still looking at this site...This works but if i decide to cancel the process (ie not save a file and stop the process at this stage) it doesn't svae the file but the following marco (filltolastrow2) is still activated how can I stop this happening? Public Sub SaveaCopyIncomeSheet() Dim file_name As Variant file_name = Application.GetSaveAsFilename("Overdue Report - Draft", filefilter:="Excel Files(*.xls),*.xls") If file_name <> False Then ActiveWorkbook.SaveAs Filename:=file_name MsgBox "File Saved!" End If filltolastrow2 End Sub

    Read the article

  • Creating excel template 2003 in C# on a machine with both 2003 and 2007 installed.

    - by Ragha J
    I have both 2003 and 2007 Excel versions installed on my machine. The current source code uses Office11 (2003) interop assembly Microsoft.Office.Interop.Excel.dll to create the Excel template. When I create the template and open in Excel 2007, it opens perfectly. The same template when I open in 2003 I get the message "File format is not valid". _excel = new Excel.Application(); _workbooks = _excel.Workbooks; _excel.Visible = false; _excel.DisplayAlerts = false; // create and add a workbook with 1 worksheet named "Sheet1" _workbook = _workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet); _sheet = (Excel.Worksheet)_workbook.ActiveSheet;

    Read the article

  • Excel Automation From .NET - creating a new worksheet

    - by Andrew Shepherd
    I am attempting what seems like a simple task: using C# to create a new Excel document containing new worksheets. For some reason, I am getting a strange COM error (0x800A03EC) Has anyone managed to get this to work? Does anyone have suggestions as to how to troubleshoot this? I've isolated this into the minimum amount of code: using Microsoft.Office.Interop.Excel; using System.Diagnostics; namespace ExcelAutomation { public static class ExcelTests { public static void CreateWorksheet() { try { var app = new Microsoft.Office.Interop.Excel.Application(); app.Visible = true; var workBooks = app.Workbooks; var newWorkbook = app.Workbooks.Add(XlWBATemplate.xlWBATWorksheet); Worksheet existingWorksheet = (Worksheet)newWorkbook.Sheets[1]; Worksheet workSheet = (Worksheet)newWorkbook.Sheets.Add ( null, // before existingWorksheet, null, // 1, null //XlSheetType.xlWorksheet ); } catch (System.Runtime.InteropServices.COMException ex) { Trace.WriteLine(string.Format("Caught COMException. Message: \"{0}\"", ex.Message)); } } } } The output window now says: Caught COMException. Message: "Exception from HRESULT: 0x800A03EC"

    Read the article

  • Excel Automation - creating a new worksheet

    - by Andrew Shepherd
    I am attempting what seems like a simple task: using C# to create a new Excel document containing new worksheets. For some reason, I am getting a strange COM error (0x800A03EC) Has anyone managed to get this to work? Does anyone have suggestions as to how to troubleshoot this? I've isolated this into the minimum amount of code: using Microsoft.Office.Interop.Excel; using System.Diagnostics; namespace ExcelAutomation { public static class ExcelTests { public static void CreateWorksheet() { try { var app = new Microsoft.Office.Interop.Excel.Application(); app.Visible = true; var workBooks = app.Workbooks; var newWorkbook = app.Workbooks.Add(XlWBATemplate.xlWBATWorksheet); Worksheet existingWorksheet = (Worksheet)newWorkbook.Sheets[1]; Worksheet workSheet = (Worksheet)newWorkbook.Sheets.Add ( null, // before existingWorksheet, null, // 1, null //XlSheetType.xlWorksheet ); } catch (System.Runtime.InteropServices.COMException ex) { Trace.WriteLine(string.Format("Caught COMException. Message: \"{0}\"", ex.Message)); } } } } The output window now says: Caught COMException. Message: "Exception from HRESULT: 0x800A03EC"

    Read the article

  • When importing an Access table into Excel, a look-up column is showing all values as numbers

    - by user3651997
    I have a basic Access to Excel question that has me frustrated. I have two Access 2010 data tables. One is a list of managers. The primary key is a manager ID (which is an autonumber because managers can have the same name), and each row also has manager name, manager email, etc. The second data table is a list of departments. The primary key for each row is a unique department code, and the foreign key is a manager ID (autonumber). I used the Look-up Wizard to create this connection. However, Access does not show the manager ID in the foreign key location. It shows Manager Name like I requested when I used the Look-up Wizard. Now I am trying to import the second table (departments) into Excel 2010. I clicked import from Access, chose the Department table, and everything popped into Excel. BUT, the Manager Name column is showing Manager ID instead. So I have a list of numbers instead of names. How can I make Excel show what I see in Access? Thanks!

    Read the article

  • Why is only one Excel spreadsheet crippled, but others are fine?

    - by Dallas
    I have an inherited spreadsheet that I really don't want to rebuild at the moment. It's a simple small workbook that is small (< 200 rows that don't even reach to AA) and does nothing more than calculate some totals within the same worksheets. No macros, no external data sources, nothing beyond basic formatting of dates, numbers and strings. I see importing data from CSV/text has created many many workbook connections over time, but even if I delete them all (there were hundreds) it makes no difference in performance. Even clicking to simply change focus from cell to cell takes 10+ seconds, adorned by the spinning cursor and (Not Responding) appending to the title bar and the application locking up. The program seems to "recover" every time, but efficiency of editing this file is obviously seriously handicapped. All other files seem fine in Excel, and other programs have no apparent performance issues. I see Excel is chewing up CPU but I'm not sure how to narrow down what process or service is "clashing" with Excel. I tried the same file on other computers and performance is fine. If I turn off all start-up services and run only Excel, performance is restored... until I start using other programs and then it bogs down again. At this point, I would entertain almost any idea, theory or suggestion that helps pinpoint, solve or work around the issue.

    Read the article

  • How to select all ActiveX objects in an area using a mouse in Excel?

    - by enderland
    Because of this problem with ActiveX objects changing size, I am not grouping my ActiveX objects in my Excel worksheet. Grouping them causes my solution hack to not work which is quite annoying. However, I often times want to be able to essentially use the mouse and select a region and then select all ActiveX objects contained in the region. This would also be useful for easily selecting objects to group them initially. Basically: Use mouse to select area Automatically select all ActiveX components in region I'm fine with a VBA solution if needed. How can I do this?

    Read the article

  • Excel: Is it possible to have rows with sub-totals that doesn't ruin the total-total?

    - by Svish
    I have an excel sheet which looks something like this: date text value other-value date text value other-value date text value other-value date text value other-value totals sum other-sum The sum is of course a sum of all the values above it. What I am wondering is if there is a way I can add rows with a sub-total at random places through out that list. For example if I would like to have a sub-total for each new month. My problem is of course that the total sum will become way to large because it will also sum the rows with the sub-totals. Does Excel have a feature that can help me so I can have the sub-totals and a correct total-total? I'm using Excel 2010.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >