Search Results

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

Page 75/192 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • How to overwrite an excel application without prompting the users..

    - by Mark
    Can anyone help me on how can I overwrite the excel file without prompting the users in VB.Net.. I have try this code but It doesn't work.. Dim xlsApp As New Excel.Application Dim xlsBook As Excel.Workbook Dim xlsSheet As Excel.Worksheet Dim dir As String = Application.StartupPath & "\Template\SampleTemplate.xls" xlsBook = GetObject(dir) xlsSheet = xlsBook.Sheets("Per BPA Error Report") xlsSheet.Range("C2:T2").Merge() xlsApp.DisplayAlerts = False xlsSheet.SaveAs(Application.StartupPath & "\Template\SampleTemplate.xls") xlsBook = Nothing xlsSheet = Nothing xlsApp.Quit()

    Read the article

  • How to generate a round-numbers graph in Excel?

    - by tcheregati
    folks! Now, I have an Excel file with measurements I made of some color patches (I work at a Press company), with a device called spectrophotometer. Here it is: https://docs.google.com/open?id=0B0i8fdSf2ihzRlFYNWd4anItenM Density and Hue are two characteristics of each color patch. The thing is: I'm looking at a non-linear increase between the 25 Color Density measurements I took, but I NEED to know exactly how the color's Hue changes as the color's Density increases. For that, I needed Excel to give me round numbers for the X axis (for example 0,70 to 1,50 in 0,05 increments). And for that, obviously, I needed Excel to calculate the probable Hue Values corresponding to those ghost/round/not-given values of Density (like a kind of advanced rule of three). So, can anyone help me on that? Thanks a lot!

    Read the article

  • How to get back to having OPEN IN SINGLE INSTANCE" as default for Excel 2007?

    - by rweeks
    In June Mikhail asked the same question but the answer was how to do the opposite (make multiple instances the default). I am trying to get to an answer to Mikhail's question which I rephrase as :- I have same problem with 64 byte Windows 7 and Excel 2007. Excel always used to open in a single instance n o matter how/where I opened the sheets. Because of this I could always copy and paste, etc with full formatting, formulas, etc. Suddenly, Excel switched to opening everything in fresh, separate, multiple instances and destroyed the basic cut and paste options. Wasn't the original question how to go back to everything in a single instance ? I have been searching for the answer to that question (rather than the opposite) Richard

    Read the article

  • Excel; exporting/importing different columns to different csv files

    - by Sisyphus
    Is there a way to batch export different columns to different csv files in excel on an OSX, I'm thinking something along the lines of possibly automator, applescript or bash. I've had a look play around with automator and so far no look. The best I have accomplished export the whole sheet, then use sed to strip out what I don't need, however this is terribly inefficient. Also, is there a method, to batch import multiple csv files into columns. Thanks in advance && sorry I didn't tag excel correctly it wouldn't allow me to create the excel:mac tag

    Read the article

  • How do I get a new column from a Sharepoint list into Excel?

    - by Jono
    I've been using Excel to process data from a Sharepoint list for a while now. However, I recently added a column to the Sharepoint table, and when I refresh the data in Excel, I don't get the new column. I perform a lot of calculations based on this data, so creating a new worksheet with the "new" Sharepoint list, moving the calculations and the pivots to THAT sheet is more hassle than I'd like to face. Is there a way to force Excel to display this new column that I've added? Maybe by modifying the connection string?

    Read the article

  • How do I join two worksheets in Excel as I would in SQL?

    - by Joel Coehoorn
    I have two worksheets in two different Excel files. They both contain a list of names and addresses. One is a master list that includes other fields, and the other is a list that only includes name and address and an id column that was pared down by another office. I want to use the 2nd list to filter the first. I know how I could do this very easily with a database inner join, but I'm less clear on how to do this efficiently in Excel. How can join two worksheets in Excel? Bonus points for showing how to do outer joins as well, and I would greatly prefer konwing how to do this without needing a macro.

    Read the article

  • How can I convert an ordinary text file to a .csv file, and import it to Excel?

    - by Xavierjazz
    I have a group of names and addresses that I would like to import into Outlook. At the moment I have imported them into Excel, but all names and addresses are in one long entry. All are already separated by a comma. How can I get Excel to select each "value" and move it to a separate cell? Edit: I had already tried taking a text file and saving it as a .csv file. However, all contacts load into a single cell. I am using Excel 2003. Thanks.

    Read the article

  • How can I turn off flash fill automatically in Excel 2013?

    - by user3480643
    Flash fill breaks a lot of things in older excel documents. It causes maddeningly slow transfers from cell to cell after updating. I am trying to find a way to turn off "flash fill" in Excel 2013 automatically before rolling the product out to the rest of the staff in my company. Is there (preferably) a registry key that I can apply or a switch that I can include during the install that will turn this option off? Here is an image of the setting that I am looking to turn off: I haven't been able to find any documentation online about turning this off, other than this one page from MS: http://office.microsoft.com/en-ie/excel-help/turn-flash-fill-on-HA104043292.aspx

    Read the article

  • How do I resolve the error "Excel found unreadable content in (filename)"?

    - by Vernon
    Has anyone else seen this? Sometimes when I open certain worksheets in Excel 2010 I see the message in the title. Excel then asks if I want to repair the file. I say "Yes" and Excel reports that the file is repaired. A log file says something about removed records. However, there does not seem to be anything missing from the file, and all sheets and VB macros in the workbook work just fine. Any suggestions?

    Read the article

  • What could slow Excel on one PC but not another?

    - by zrz
    I have 2 PC with the same configuration. I open an Excel File (~5M) on the network from both PC. The opening is not the fastest but that's ok. The problem is that on one PC, Excel is really slow. I mean if I hit the left arrow 10 times, I will have finished hitting like 3 seconds before the active cell is the next 10th one. The file contains graphics that takes time to initialize on the slowed computer. Both PC have the same graphic cards, same driver version; both remote access to the file on a local network. Both configured to perform calculations automatically. Both Excel 2007. Both Windows 32bit. On the other PC it runs really fast. I really don't know what to check next. Any suggestions ?

    Read the article

  • How can I have a VBA macro perform a Search/Replace in formulas across an entire workbook?

    - by richardtallent
    I distribute an Excel workbook to a number of users, and they are supposed to have a particular macro file pre-installed in their XLSTART folder. If they don't have the macro installed correctly, and they send the workbook back to me, any formulas depending on it include the full path of the macro, e.g.: 'C:\Documents and Settings\richard.tallent\Application Data\ Microsoft\Excel\XLSTART\pcs.xls'!MyMacroFunction() I want to create a quick macro I can use to remove the improper path from every formula in the workbook. I've successfully retrieved the special folder using GetSpecialFolder (an external function that is working just fine), but the Replace call itself shown below throws an "Application-defined or object-defined error". Public Sub FixBrokenMacroFormulas() Dim badpath As String badpath = "'" & GetSpecialFolder(AppDataFolder) & "\Microsoft\Excel\XLSTART\mymacro.xls'!" Dim Sheet As Worksheet For Each Sheet In ActiveWorkbook.Sheets Call Sheet.Activate Call Sheet.Select(True) Call Selection.Replace(What:=badpath, Replacement:="", LookIn:=xlFormulas) ''//LookAt:=xlPart, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False Next End Sub Automating search and replace isn't exactly my forte, what am I doing wrong? I've already commented out some of the parameters that don't seem essential.

    Read the article

  • Simple C# CSV Excel export class

    - by Chris
    Thought this might be handy for someone, this is an extremely simple CSV export class that I needed. Features: Extremely simple to use Escapes commas and quotes so excel handles them fine Exports date and datetimes in timezone-proof format Without further ado: using System; using System.Data.SqlTypes; using System.IO; using System.Text; using System.Collections.Generic; /// <summary> /// Simple CSV export /// Example: /// CsvExport myExport = new CsvExport(); /// /// myExport.AddRow(); /// myExport["Region"] = "New York, USA"; /// myExport["Sales"] = 100000; /// myExport["Date Opened"] = new DateTime(2003, 12, 31); /// /// myExport.AddRow(); /// myExport["Region"] = "Sydney \"in\" Australia"; /// myExport["Sales"] = 50000; /// myExport["Date Opened"] = new DateTime(2005, 1, 1, 9, 30, 0); /// /// Then you can do any of the following three output options: /// string myCsv = myExport.Export(); /// myExport.ExportToFile("Somefile.csv"); /// byte[] myCsvData = myExport.ExportToBytes(); /// </summary> public class CsvExport { /// <summary> /// To keep the ordered list of column names /// </summary> List<string> fields = new List<string>(); /// <summary> /// The list of rows /// </summary> List<Dictionary<string, object>> rows = new List<Dictionary<string, object>>(); /// <summary> /// The current row /// </summary> Dictionary<string, object> currentRow { get { return rows[rows.Count - 1]; } } /// <summary> /// Set a value on this column /// </summary> public object this[string field] { set { // Keep track of the field names, because the dictionary loses the ordering if (!fields.Contains(field)) fields.Add(field); currentRow[field] = value; } } /// <summary> /// Call this before setting any fields on a row /// </summary> public void AddRow() { rows.Add(new Dictionary<string, object>()); } /// <summary> /// Converts a value to how it should output in a csv file /// If it has a comma, it needs surrounding with double quotes /// Eg Sydney, Australia -> "Sydney, Australia" /// Also if it contains any double quotes ("), then they need to be replaced with quad quotes[sic] ("") /// Eg "Dangerous Dan" McGrew -> """Dangerous Dan"" McGrew" /// </summary> string MakeValueCsvFriendly(object value) { if (value == null) return ""; if (value is INullable && ((INullable)value).IsNull) return ""; if (value is DateTime) { if (((DateTime)value).TimeOfDay.TotalSeconds==0) return ((DateTime)value).ToString("yyyy-MM-dd"); return ((DateTime)value).ToString("yyyy-MM-dd HH:mm:ss"); } string output = value.ToString(); if (output.Contains(",") || output.Contains("\"")) output = '"' + output.Replace("\"", "\"\"") + '"'; return output; } /// <summary> /// Output all rows as a CSV returning a string /// </summary> public string Export() { StringBuilder sb = new StringBuilder(); // The header foreach (string field in fields) sb.Append(field).Append(","); sb.AppendLine(); // The rows foreach (Dictionary<string, object> row in rows) { foreach (string field in fields) sb.Append(MakeValueCsvFriendly(row[field])).Append(","); sb.AppendLine(); } return sb.ToString(); } /// <summary> /// Exports to a file /// </summary> public void ExportToFile(string path) { File.WriteAllText(path, Export()); } /// <summary> /// Exports as raw UTF8 bytes /// </summary> public byte[] ExportToBytes() { return Encoding.UTF8.GetBytes(Export()); } }

    Read the article

  • How do I use a .NET class in VBA? Syntax help!

    - by Jordan S
    ok I have couple of .NET classes that I want to use in VBA. So I must register them through COM and all that. I think I have the COM registration figured out (finally) but now I need help with the syntax of how to create the objects. Here is some pseudo code showing what I am trying to do. EDIT: Changed Attached Objects to return an ArrayList instead of a List The .NET classes look like this... public class ResourceManagment { public ResourceManagment() { // Default Constructor } public static List<RandomObject> AttachedObjects() { ArrayList list = new ArrayList(); return list; } } public class RandomObject { // public RandomObject(int someParam) { } } OK, so this is what I would like to do in VBA (demonstrated in C#) but I don't know how... public class VBAClass { public void main() { ArrayList myList = ResourceManagment.AttachedObjects(); foreach(RandomObject x in myList) { // Do something with RandomObject x like list them in a Combobox } } } One thing to note is that RandomObject does not have a public default constructor. So I can not create an instance of it like Dim x As New RandomObject. MSDN says that you can not instantiate an object that doesn't have a default constructor through COM but you can still use the object type if it is returned by another method... Types must have a public default constructor to be instantiated through COM. Managed, public types are visible to COM. However, without a public default constructor (a constructor without arguments), COM clients cannot create an instance of the type. COM clients can still use the type if the type is instantiated in another way and the instance is returned to the COM client. You may include overloaded constructors that accept varying arguments for these types. However, constructors that accept arguments may only be called from managed (.NET) code. Added: Here is my attempt in VB: Dim count As Integer count = 0 Dim myObj As New ResourceManagment For Each RandomObject In myObj.AttachedObjects count = count + 1 Next RandomObject

    Read the article

  • Java List to Excel Columns

    - by Nitin
    Correct me where I'm going wrong. I'm have written a program in Java which will get list of files from two different directories and make two (Java list) with the file names. I want to transfer the both the list (downloaded files list and Uploaded files list) to an excel. What the result i'm getting is those list are transferred row wise. I want them in column wise. Given below is the code: public class F { static List<String> downloadList = new ArrayList<>(); static List<String> dispatchList = new ArrayList<>(); public static class FileVisitor extends SimpleFileVisitor<Path> { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { String name = file.toRealPath().getFileName().toString(); if (name.endsWith(".pdf") || name.endsWith(".zip")) { downloadList.add(name); } if (name.endsWith(".xml")) { dispatchList.add(name); } return FileVisitResult.CONTINUE; } } public static void main(String[] args) throws IOException { try { Path downloadPath = Paths.get("E:\\report\\02_Download\\10252013"); Path dispatchPath = Paths.get("E:\\report\\01_Dispatch\\10252013"); FileVisitor visitor = new FileVisitor(); Files.walkFileTree(downloadPath, visitor); Files.walkFileTree(downloadPath, EnumSet.of(FileVisitOption.FOLLOW_LINKS), 1, visitor); Files.walkFileTree(dispatchPath, visitor); Files.walkFileTree(dispatchPath, EnumSet.of(FileVisitOption.FOLLOW_LINKS), 1, visitor); System.out.println("Download File List" + downloadList); System.out.println("Dispatch File List" + dispatchList); F f = new F(); f.UpDown(downloadList, dispatchList); } catch (Exception ex) { Logger.getLogger(F.class.getName()).log(Level.SEVERE, null, ex); } } int rownum = 0; int colnum = 0; HSSFSheet firstSheet; Collection<File> files; HSSFWorkbook workbook; File exactFile; { workbook = new HSSFWorkbook(); firstSheet = workbook.createSheet("10252013"); Row headerRow = firstSheet.createRow(rownum); headerRow.setHeightInPoints(40); } public void UpDown(List<String> download, List<String> upload) throws Exception { List<String> headerRow = new ArrayList<>(); headerRow.add("Downloaded"); headerRow.add("Uploaded"); List<List> recordToAdd = new ArrayList<>(); recordToAdd.add(headerRow); recordToAdd.add(download); recordToAdd.add(upload); F f = new F(); f.CreateExcelFile(recordToAdd); f.createExcelFile(); } void createExcelFile() { FileOutputStream fos = null; try { fos = new FileOutputStream(new File("E:\\report\\Download&Upload.xls")); HSSFCellStyle hsfstyle = workbook.createCellStyle(); hsfstyle.setBorderBottom((short) 1); hsfstyle.setFillBackgroundColor((short) 245); workbook.write(fos); } catch (Exception e) { } } public void CreateExcelFile(List<List> l1) throws Exception { try { for (int j = 0; j < l1.size(); j++) { Row row = firstSheet.createRow(rownum); List<String> l2 = l1.get(j); for (int k = 0; k < l2.size(); k++) { Cell cell = row.createCell(k); cell.setCellValue(l2.get(k)); } rownum++; } } catch (Exception e) { } finally { } } } (The purpose is to verify the files Downloaded and Uploaded for the given date) Thanks.

    Read the article

  • Excel COM - Unable to get the Open property of the Workbooks class?

    - by Abs
    Hello all, I have tried this and I get this error: $excel_app = new COM("Excel.Application") or Die ("Did not connect"); $Workbook = $excel_app->Workbooks->Open('Variables.xls') or Die('Did not open filename'); I get this error: Unable to get the Open property of the Workbooks class What does this error mean? In addition, is there an API or a function list for accessing excel via COM. Thanks all Update Full error: exception 'com_exception' with message 'Source: Microsoft Excel Description: Unable to get the Open property of the Workbooks class' in C:\excel.php:22 Stack trace: #0 C:\excel.php(22): variant->Open('C:\...') #1 {main}

    Read the article

  • Too Many Different Cell Formats

    - by Craig
    I have a massive file with 10 sheets recreated from scratch, 12 sheets updated, 5 sheets loaded with raw data, and 7 sheets that are used by the macros for the report. I have recently added a new sheet and am running into the Excel "Too many different cell formats" problem. I have read some of the google search results and they say I should simplify the formatting, but I don't even know how I got up to 4000 distinct cell formats, let alone how much I'm using which ones, so I can remove some. It is also popping up some times the file is run, but not all, until such time as it comes up, and then it happens every time it is run. Since the macro is doing so much of the work, including creating the 10 sheets from scratch, I am not sure what to do. Does anyone know of a Macro I could run to get a listing of all the cell formats and how many cells are using them? Does anyone know of a program they trust to help remove excess cell formats? Thanks, Craig

    Read the article

  • an HTML file is NOT an Excel file, right?

    - by longneck
    we use an application that has an "export to excel" feature that doesn't work on PC's that done have outlook express installed. i know, you're thinking "WTF does outlook express have to do with excel files?" i asked the same thing, and here's what i found: the file being generated is actually one of those Microsoft Single File Web Pages (.mht) and NOT an excel file you need to have outlook express installed to actually view a .mht file. i've explained to their support people that just because you can slap a .xls on a file and excel will open it does not mean its an excel file, and does not mean that this is the right way to do it. how would you explain that this is not proper?

    Read the article

  • Filtering and then counting distinct values

    - by Deon
    This is for Excel: I've been tasked with counting distinct records after I have filtered the data. I have 330 rows with column A containing the 'name' and in Column B I have the name of a test that was done for each 'name', which each 'name' could have taken several iterations of the same test. The test results are in Column C. Col A -Student Col B -Exam Col C - Grade Student 1 Exam 1 .80 Student 2 Exam 1 .50 Student 3 Exam 1 .90 Student 2 Exam 1 .75 Student 4 Exam 1 .90 Student 5 Exam 1 .55 Student 2 Exam 2 .90 Student 1 Exam 2 .90 .... .... ... If I filter col B for Exam 1, I want to count the unique number of students that have taken Exam 1.

    Read the article

  • Export an Excel spreadsheet to fixed-width text file?

    - by jkohlhepp
    Excel has the functionality to import fixed-width text files where it presents a dialog that lets you choose where the begins and ends of fields are which it puts into columns. Does it also have functionality where, given an existing spreadsheet, you can export to a fixed-width text file? If so, how do I access this? I have tried using Save As and choosing Text File but it seems to only save as Tab-delimited which doesn't help me. This is Excel 2003 if it matters.

    Read the article

  • Excel 2007: what happened to the Auto Expand Selection tool?

    - by Erik Olson
    Older versions of Excel had a icon that would expand the selection to include any non-empty cells in all directions. It was an X shape with four arrowheads. You can still write VBA code to do this, but I really miss this tool. Did they just drop it from Excel 2007? In older versions you had to go get it from the Customize menu because it wasn't on any toolbar by default.

    Read the article

  • How do I make the first row of an Excel chart be treated as a heading when it's a number?

    - by Andrew Grimm
    Given a data sample like Prisoner 24601 0.50 Day 1 80 90 Day 2 81 89 Day 3 82 90 Day 4 81 91 What's the easiest way to tell Excel that 24601 and 0.50 are data series names rather than Y axis values when creating a line chart? Approaches I'm aware of: Turn Prisoner numbers into text by having ="24601" and ="0.50" Only select rows 2 onwards as data, and then add in the labels once the graph has been created? Approaches that don't appear to work: Ask Excel to format the first row's numbers as text.

    Read the article

  • Using Excel VBA to send emails. Problem with attachments becoming embedded by accident.

    - by Alexei
    Hi, I am having an issue with an Excel macro I wrote that is used by several users within my company. It is used to send numerous emails daily with attachments that are also Excel workbooks. The issue is that sometimes, instead of the file simply being attached as it should be, it becomes an embedded object. This embedded object is openable by users on the email within the company (after clicking through the "YOu are about to activate an embedded object that may contain viruses or be otherwise harmful to your computer. It is important to be certain that it is from a trustworthy source. Do you want to continue?"), but those outside of the company do not see it at all. The email appears to have no attachment at all. Curiously, this appears to happen randomly, and only on some computers. So if the list has 15 email lists and attachments, it seems to happen randomly to anywhere between 0 and 15 of the emails. To be clear, my objective is to send emails with regular attachments. Running Excel 2003, Outlook 2003, and Windows XP. See code below. Please help! Sub Email() Dim P As String Dim N As String Dim M As String Dim Subject As String Dim Addresses As String Dim olApp As Outlook.Application Dim olNewMail As Outlook.MailItem Application.DisplayAlerts = False M = ActiveWorkbook.Name For c = 2 To 64000 If Range("B" & c) = "" Then Exit For If UCase(Range("E" & c)) = "Y" Then Workbooks(M).Sheets("Main").Activate Subject = Range("A" & c) Addresses = Range("B" & c) P = Range("C" & c) N = Range("D" & c) If Right(P, 1) <> "\" Then P = P & "\" If Right(N, 4) <> ".xls" Then N = N & ".xls" Set olApp = New Outlook.Application Set olNewMail = olApp.CreateItem(olMailItem) With olNewMail .Display .Recipients.Add Addresses Application.Wait (Now + TimeValue("0:00:01")) SendKeys ("{TAB}") .Subject = Subject .Attachments.Add P + N .Send End With Set olNewMail = Nothing Set olApp = Nothing End If Next c Range("E2:E65536").ClearContents Application.DisplayAlerts = True End Sub

    Read the article

  • Why is it not possible to call RegFree COM and .NET from the VB IDE (VB6 & VBA)?

    - by DangerMouse
    Hi I have an example project with works when called from compiled VB6 but not from the IDE or from Excel's VBE. There are 3 DLLs QA.DLL, QB.DLL, QAW.DLL. QA is written in C#.NET, QB and QAW are written in VB6. QAW is a COM wrapper of QA. In the calling code I create an Activation Context and load a manifest file. All works fine from the exe created with VB6, but not in debug mode in VB6 or in Excel's VBA. I have the full example in zip. Any ideas what it is that is different about the IDE call and why it doesn't work? Many Thx -- DM

    Read the article

< Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >