Locking formatting in Excel 2010

Hi guys I'd like to know if its possible to lock the down the cells in Excel 2010 but still be able to add content to them.
I want the structure of the page/worksheet to remain the same for printing but I still need others to add information to the cells.
Thanks!

It's a two-step process. By default, all cells in Excel are locked but this only becomes effective when you protect the worksheet.
1) Select the cells that the users should be able to edit.
Press Ctrl+1 to activate the Format Cells dialog.
Activate the Protection tab.
Clear the 'Locked' check box.
Click OK.
2) Activate the Review tab of the ribbon.
Click Protect Sheet.
Tick/clear check boxes to specify what the users will be allowed to do. At the very least, leave the check box 'Select unprotected cells' ticked.
If desired, specify a password (DO NOT FORGET THE PASSWORD!)
Click OK (if you specified a password, you'll have to enter it again).
Save the workbook.
Regards, Hans Vogelaar

Similar Messages

  • Scroll lock function on Excel 2010 on Macbook pro

    I am running Excel 2010 on my Macbook pro and cannot seem to switch off the scroll lock.  It will work when I hit the F14 key on my wireless keyboard, but that is in my office and not to hand all the time.  When i restart excel the scroll lock is on again.
    As you know on a Macbook Pro the keys only go to F12 but the suggested Shift+FN+F12 doesn't work

    I suggest you ask your question on the Microsoft Mac forums as it's their software you're having problems with.  These forums are for troubleshooting Apple products, and not related to your question in any way.
    http://answers.microsoft.com/en-us/mac

  • DatePicker format Issue Excel 2010

    I have an employee absenteeism form that uses this formula to calculate number of days out of office.  J18 is the shift (shifts less than 40 are 3-day shifts, >40 are 4-day shifts).  The start date is in cell E28 and the end date is
    in H28.  AN69-AN96 are vacation days.
    IF($J$18>40,(SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(E28&":"&H28)),2)<5),--(1-ISNUMBER(MATCH(ROW(INDIRECT(E28&":"&H28)),AN69:AN96,0))))),IF($J$18<40,(SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(E28&":"&H28)),2)>4),--(1-ISNUMBER(MATCH(ROW(INDIRECT(E28&":"&H28)),AN69:AN96,0)))))))
    When a supervisor manually enters the dates, it works fine.  I added DatePicker and now the formula doesn't work.  If I retype the dates exactly as DatePicker puts them into my cells, the formula works!  
    Any ideas as to why it doesn't work with DatePicker?
    Thanks
    Diana

    It didn't quite work. I am trying to autofilter data with this code and two data pickers which were linked to cells D3 and E3. I added the code you provided into the worksheet module and disconnected the link per your instructions, but it is still not filtering
    correctly - it is now treating those cells as if they were 0 values.
    Public Sub DatumFilter()
    Dim startdate As Long, enddate As Long
        startdate = Range("D3").Value
        enddate = Range("E3").Value  
           Range("D6:D20000").AutoFilter field:=1, _
            Criteria1:=">=" & startdate, _
            Operator:=xlAnd, _
            Criteria2:="<=" & enddate
    End Sub
    Again, any help would be greatly appreciated! Thanks

  • How to make Excel 2010 save a HTML report as a file without a folder created

    We have a HTML report generated by Oracle Report with headers as below:
    <html xmlns:v="urn:schemas-microsoft-com:vml"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns="http://www.w3.org/TR/REC-html40">
    In Excel 2010, after pressing the "save" button (not "save as"), it will by default save the report as web page format instead of xls, a folder "xxx.files" containing some css, xml and html files are created
    in it. If user deletes the folder carelessly, the excel report cannot be viewed at all.
    In Excel 2003, we can save it directly in its original format simply by pressing the "save" button, without creating a folder. May I know if there are any options in office 2010, macro or registries settings that can make
    Excel 2010 to do the same as Excel 2003 when pressing the "save" button? Thanks!

    Hi,
    According to your description, you want a workaround to avoid creating a new folder when saving a html file in Excel 2010.
    In my opinion, this issue is more related to the feature of HTML format or Excel 2010 application rather and I don't think we could resort to a macro or registry settings to avoid that. I suggest you posting it in
    Excel IT pro forum for more effective responses.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to export data from MS Project 2010 to MS Excel 2010 with formatting

    I have created a Project 2010 export map to Excel 2010.  It works fine.  I have two questions that I cannot determine an answer.  I'm not sure if its a project or excel setting.  I have spend hours trying to make it
    work with little success.
    1.  When the task name field is exported to excel it losses summary/task indent.  Is there a way to set it up so it works via the export map?
    2.  The Start & Finish fields in project is setup as 5/26/11 when they exports to excel it shows up as 5/26/11 8:00 AM.  Is there a way to set it up either in project export map or excel so its formated as a date field. 
    Excel's Format Cell function does not seem to work converting them back to just 5/26/11.
    How can I keep the outlines and formatting in my data while exporting it to Excel.
    I would appreciate any guidance.
    Yogesh

    Rameshchandra --
    Two things I would recommend:
    Do not add your question at the end of a post that is marked as Answered.  In the future, please post your question as a new question so that everyone will notice it and be able to answer it.
    Because this is a programming question, please repost your question as a new post in the Project Customization and Programming user forum at:
    http://social.technet.microsoft.com/Forums/projectserver/en-US/home?forum=project2010custprog&filter=alltypes&sort=lastpostdesc
    Hope this helps.
    Dale A. Howard [MVP]

  • Extracting a Report from SAP Spool into a Useful Excel 2010 Format

    Hi All,
    Extracting a Report from SAP Spool into a Useful Excel 2010 Format.  I'm currently running the following report in SAP  and would like the
    ability to set this report up as a recurring report running weekly and
    subsequently access this report in a useable Excel 2010 format without
    much data manipulation.  Can you please assist me.  Below, I've tried to
    provide an example of what I'm encountering.   Thanks, beforehand for
    your assistance.
    Here goes:
    Step one: Run 62 Report in SAP S_P99_41000062- Material List Price and
    Inventory
    Step 2. Select stored Variant "Weekly KPI", ok. Enter the enter  the
    desired company code and period I want thre report to run for and update
    the currency, if necessary. Having input my desired criteria, I believe
    I can either execute immediately, run in the background, preset to run
    at date in the future. For this example let's just execute, immediately.
    This is where the difference originates. Given, I run this report
    immediately, I'm able to simply extract the result to Excel via the list
    selection noted in the tool bar below.  The result is a data friendly
    excel 2007  report is automatically generated.
    Export to Excel via list:
    Select save and Excel 2007 opens automatically:
    That said, the method outlined above works perfectly fine if you want
    the report immediately.  Now let go back and run the exact same report
    with exceptoin of running it in the background and having to retrieve it
    from the Spool (SP01) uisng my user ID.  Given the report generated in
    the background,  I would now access the report via the spool and make
    the following selections:
    SP01 + execute to see my report
    I would hit the sunglasses to see the actual report, then want to
    extract this report to Excel by selecting the export option.
    I would at this point select spreadsheet and be given an option to save
    the spreadsheet to local file. However, upon trying to open the
    spreadsheet I will receive an error messageindicating that the format is
    different than that which the file I am currently trying to open it
    with.  I'm currently running Excel 2010 on my computer.  The currency
    format and other issues arrise with this extract.  Please help. 
    Thanks,
    Chowadary.

    Update to Latest GUI.
    Use   List -> Export -> Spreadsheet  to get the output to excel.
    I remember in ALV max length allowed is 1023 characters and the max no of columns supported is 90. Issue occurs when row size of exported data gets more than 1023 character. (This includes if Long/Medium Header Text used ) If it exceed 1023 character the columns splits and moves to next row.
    Check your fieldcatog for header lengths.
    -Satya

  • Lock Excel 2010 Headers and Footers in Protected Worksheet

    Hi,
    Is there any way to lock Excel 2010 Headers and Footers in a Protected Worksheet?
    Thank You!

    Hi,
    Here is one way to 'lock' the header and footer control, by disabling it in the WorkBook_Open event.
    You indicate that the workbook is 'macro enabled', so if you are well versed in VBA please forgive the following
    step by step 'how to'.
    Copy the following code to the clipboard:
    Private Sub Workbook_Open()
    Application.CommandBars("Worksheet menu bar"). _
    Controls("View").Controls("&Header and Footer...").Enabled = False
    End Sub
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.CommandBars("Worksheet menu bar"). _
    Controls("View").Controls("&Header and Footer...").Enabled = True
    End Sub
    Press ALT + F11
    Double click 'THIS WORKBOOK' in the Microsoft Excel Objects in the upper left quadrant.
    Paste both event handlers into the WorkBook module editing area to the right.
    Close the VBE and return to the worksheet.
    Save the workbook.
    Now, whenever the workbook is opened, the Header and Footer option under the View tab will be disabled (grayed out). When the workbook is closed, the control will be enabled again so it will be accessible in all subsequently opened workbooks.
    If you wish to have access to the header and footer for 'maintenance', copy the following macro to the clipboard:
    Sub HeadnFoot()
    If Application.CommandBars("Worksheet menu bar"). _
    Controls("View").Controls("&Header and Footer...").Enabled = False Then
    Application.CommandBars("Worksheet menu bar"). _
    Controls("View").Controls("&Header and Footer...").Enabled = True
    Else
    Application.CommandBars("Worksheet menu bar"). _
    Controls("View").Controls("&Header and Footer...").Enabled = False
    End If
    End Sub
    ALT + F11 to access the VBE.
    INSERT > MODULE
    Paste the macro into the module editing area to the right.
    Close the VBE.
    Press ALT + F8
    When the Macros window opens, highlight this macro and click 'Options..'.
    Enter a letter to be used as a keyboard shortcut and click 'OK'.
    Close the Macros window.
    Save the workbook.
    Now, when you open the workbook and need to modify the header or footer, press CTRL + your shortcut letter and the control will be enabled. Press the keyboard shortcut again and the control will again be disabled. It is a 'toggle' macro.
    Sincerely,
    Harry

  • Excel 2010 locks up when using Smartview to run Business Rule

    I've been testing Smart View 9.3..3 with Excel 2010.
    If (from within Smart View) I navigate to Hyperion>Calculation Options>Business Rules, Excel locks up and only an 'End Process' will close it down.
    As a workaround the Rule that the user needs to run has been attached to a Form & this works correctly, wondered if anyone else had seen this ?
    Thanks

    re:  more excel crashing
    Well you asked about other ideas so...
    1. Turn off Auto-Save
    2. Turn off file-sharing
    3. Locate the XLSTART directory, move everything there someplace else.
    4. You disabled all add-ins, but does that include Com add-ins and the other flavors.
    5. Does the user have an anti-virus app installed - disable it.
    6. Doug Robbins (Word MVP) has an exhaustive list of problems/solutions for crashes in Office 2013.
        There will be overlap with Office 2010...
    http://answers.microsoft.com/en-us/office/forum/office_2013_release-customize/something-went-wrong/b178f08f-3f59-4938-8f39-2af189bffd44
    7. Don't know anything about it, but another idea ...
       "Fix a corrupted user profile"  http://windows.microsoft.com/en-us/windows/fix-corrupted-user-profile#1TC=windows-7
    Wish you good luck
    Jim Cone

  • Excel 2010 missing default suggested file name in Save As dialog box

    I’m using Excel 2010 running on Windows 7 (32 bit).  When I open a certain file which produces the following message: "A file is in a different file format than its extension indicates", and then go to “Save As” (or “Save”) the
    file, the default suggested file name is missing (blank).  This didn't occur in previous versions of Excel. 
    In previous versions, Excel would automatically populate the original file name in to the File Name field.
      I have searched all over the net, looking for a way to change Excel so that it will once again populate the file name in this situation. 
    To reproduce:
    Create a new blank workbook
    save as type “Web Page”, (i.e. File name:  “Blank Example.html”)
    Close workbook
    In windows, rename file from .html to .xls  (i.e. rename “Blank Example.html” to “Blank Example.xls”)
    In Excel open renamed file (i.e. “Blank Example.xls”) and click “Yes” when prompted with the “A file is in a different file format than its extension indicates” message.
    Do a “Save As” and you will notice that the File Name is blank. In previous versions, this field would contain the current workbook file name
     (i.e. “Blank Example.xls”)
    Any help will be greatly appreciated.

    Hi Jaynet,
    In order to re-produce this, you need to answer "yes" to the rename file prompt and then continue with step 5 (above).
    The reason for this is not an exercise in futility - I assure you.  At my work and elsewhere, when web developers have created features to permit the end user to save web data in Excel format, often times the Excel files are saved locally in Excel's
    html format (but with the .xls
    extension). 
    (I actually prefer the .xls
    extension, because it is easier to just double-click the file to open in Excel, rather than to select the open-with and then select Excel. a file with the .html extension will default open in your default browser. Now, I could change my default program
    for the .html extension, but that would only solve a part of the problem and would not really address the bigger issue and that being that Microsoft changed a behavior in Excel and may not even be aware that it was a much used feature. )
    To continue, when I go to open the resulting Excel file, I am prompted with the message that the file type does not match the extension (which is fine and not bothersome to me).  It's at this point when I go to save the file that I get really annoyed.
    In previous versions of Excel, the default file name would be pre-filled with the current name of the file and the default file type would state that it is a Web html file.  I would just change the file type to Excel Workbook and hit enter to save.
    I would be prompted with "Are you sure you want to overwrite your existing file?" message and I would click "yes" and that would be that.
    However, in Excel 2010, because the default file name is blank, I then need to re-type the name into the field to save the file. 
    Any help is greatly appreciated.
    Thanks

  • Excel 2010 Synchronize List with SharePoint List using VBA

    I have used and loved the interaction between Excel and SharePoint for many generations of both solutions.  It's a wonderful opportunity to integrate the familiarity and simplicity of Excel (formatting, ease of use, availability) with the data storage
    and centralized list capabilities of SharePoint.  Right?
    When upgrading to Excel 2010, I have noticed with much dismay that much of the inherent easy to use features of previous versions were effectively stripped from this newest version.  Much research, time and energy has been spent working around and resolving
    the deficiency.  One Microsoft based article,
    http://support.microsoft.com/kb/930006, has provided the mechanics behind utilizing the "hidden" functionality... although, this capability to use VBA to create the synchronized list was available in previous versions.  However, once Microsoft
    published this article to this "hidden" functionality... I feel that the behavior should be supported by Microsoft in some way.  OK?
    Revised instructions to reproduce the problem:
    1. Create a SharePoint list with 20 dummy records.
    - Note the List Name  ##LIST_NAME##
    - Note the View GUID  ##VIEW_GUID##
    - Note SharePoint Base URL  ##BASE_URL##
    2. REVISED... In Excel 2010, save the file as Compatible "Excel 97-2003 Workbook".  Close the file and reopen.  Create a connected table (ListObject) in Excel using the article above to the SharePoint list.  Use Sample VBA code
    below:
    Sub LinkedSharePointList()    
    ActiveSheet.ListObjects.Add SourceType:=xlSrcExternal,_
        Source:=Array(##BASE_URL## & "/_vti_bin", ##LIST_NAME##, _
        ##VIEW_GUID##), LinkSource:=True, Destination:=Range("A1")
    End Sub
    3. OOPS REVISED this item.  The problem is actually with ROW 21... So, update record on row 21... (no matter where the table is located... (if the "Destination" is "A1", then the problem is with ID=20, but if the Table is
    shifted down to say A12, then ID=9 on row 21).  Anyway... make a simple change to that record... and you'll see the ID immediately change.... as if it's a NEW record.  WEIRD!  Note: If the sheet is protected, then an error is displayed
    indicating that a "read-only" record cannot be updated (referring to the ID cell in column A for the current row). 
    4. Now "synchronize" the list with excel.  The former record is still in the list unchanged AND there is a NEW record in the list holding the changes.  There are a number of problems that seem to ONLY occur when something changes to ROW
    21.... Next, try to copy/paste multiple records across multiple rows that intersect with ROW 21.  Yikes!! 
    I look forward to hearing others' experience!
    Thanks!
    Mark

    Here are some things that you can try (change the code, where appropriate):
    Private Sub CreateList()
        Dim folder As folder
        Dim f As File
        Dim fs As New FileSystemObject
        Dim RowCtr As Integer
        RowCtr = 1
        Set folder = fs.GetFolder("http://excel-pc:43231/Shared Documents/Forms/") '<=Variable Location
        For Each f In folder.Files
           Cells(RowCtr, 1).Value = f.Name
           RowCtr = RowCtr + 1
        Next f
    End Sub
    Sub ListAllFile()
     Dim objFSO As Object
     Dim objFolder As Object
     Dim objFile As Object
     Dim pth As String
     Dim WBn As Workbook
     Dim ObCount As Long
     Dim FileNme As String
     Application.ScreenUpdating = False
     Set objFSO = CreateObject("Scripting.FileSystemObject")
     'Get the folder object associated with the directory
     Set objFolder = objFSO.GetFolder("\\excel-pc:43231\Shared Documents\Forms\")
    '** You'll need to specify your path here. By removing the http: from the path, the code liked it & found the folder. It wasn’t working previously ***
     pth = "http://excel-pc:43231/Shared Documents/Forms/"
    '** You'll need to specify your path here. The reason I’ve done this separately is because the path is not recognised otherwise when trying to specify it with workbook.open & using the value set for objFolder **
     ObCount = objFolder.Files.Count
    '** counts the number of files in the folder
     'Loop through the Files collection
     For Each objFile In objFolder.Files
     Nm1 = Len("http://excel-pc:43231/Shared Documents/Forms/")
    '** You'll need to specify your path here **
     Nm2 = Len(objFile) - Nm1
     FileNme = Right(objFile, Nm2)
    '** I’ve done this part to find out/set the file name**
     Set WBn = Workbooks.Open(pth & FileNme, , , , Password:="YourPassword")
    '** opens the first file in the library – if there is no password, the remove everything from - , , , , Password:="Password1" – leaving the close bracket ‘)’
     Application.ScreenUpdating = False
    '** optional – you can leave the screen updating on
    '<< Your coding here>>
    '** The file is now open. Enter whatever code is specific to your spreadsheets.
     Next
    '** goes to next file within your sharepoint folder
    End Sub
    Sub SharePoint()
    Dim xlFile As String, xlFullFile As String
    Dim xlApp As Excel.Application
    Dim wb As Workbook
    xlFile = "\\excel-pc:43231\Shared Documents"
    'http://excel-pc:43231/Shared Documents/
    '****----denotes the path.(i.e) u give the path as windows search.Don't use "\" at the end.
    'In the sharepoint path %20 denotes space.so u remove that and use space .
    Set xlApp = New Excel.Application
    xlApp.Visible = True
    xlFullFile = GetFullFileName(xlFile, "Book") 'ANZ denotes starting characters of the file.
    xlFile = xlFile & "\" & xlFullFile
    Set wb = xlApp.Workbooks.Open(xlFile, , False)
    'Once the workbook is opened u can do ur code here
    wb.Close False
    End Sub
    Function GetFullFileName(strfilepath As String, _
    strFileNamePartial As String) As String
    Dim objFS As Variant
    Dim objFolder As Variant
    Dim objFile As Variant
    Dim intLengthOfPartialName As Integer
    Dim strfilenamefull As String
    Set objFS = CreateObject("Scripting.FileSystemObject")
    Set objFolder = objFS.GetFolder(strfilepath)
    'work out how long the partial file name is
    intLengthOfPartialName = Len(strFileNamePartial)
    For Each objFile In objFolder.Files 'Instead of specifying the starting characters of the file you can directly loop through all files in the folder .
    'Test to see if the file matches the partial file name
    If Left(objFile.Name, intLengthOfPartialName) = strFileNamePartial Then
    'get the full file name
    strfilenamefull = objFile.Name
    Exit For
    Else
    End If
    Next objFile
    Set objFolder = Nothing
    Set objFS = Nothing
    'Return the full file name as the function's value
    GetFullFileName = strfilenamefull
    End Function
    Sub SrchForFiles()
    ' Searches the selected folders and sub folders for files with the specified (xls) extension.
    'ListTheFiles 'get the list of all the target XLS files on the SharePoint Directory
    Dim i As Long, z As Long, Rw As Long, ii As Long
    Dim ws As Worksheet, dd As Worksheet
    Dim y As Variant
    Dim fldr As String, fil As String, FPath As String
    Dim LocName As String
    Dim FString As String
    Dim SummaryWB As Workbook
    Dim SummaryWS As Worksheet
    Dim Raw_WS As Worksheet
    Dim LastRow As Long, FirstRow As Long, RowsOfData As Long
    Dim UseData As Boolean
    Dim FirstBlankRow As Long
    'grab current location for later reference, for where to paste final data
    Set SummaryWB = Application.ActiveWorkbook
    Set SummaryWS = Application.ActiveWorkbook.ActiveSheet
    y = "xls"
    fldr = "\\excel-pc:43231\Shared%20Documents\Forms\AllItems.aspx"
    FirstBlankRow = 2
    'asd is a 1-D array of files returned
    asd = ListFiles(fldr, True)
    Set ws = Excel.ThisWorkbook.Worksheets(1) 'list of files
    ws.Activate
    ws.Range("A1:Z100").Select
    Selection.Clear
    On Error GoTo 0
    For ii = LBound(asd) To UBound(asd)
    Debug.Print Dir(asd(ii))
    fil = asd(ii)
    'open the file and grab the data
    Application.Workbooks.Open (fil), False, True
    'Get file path from file name
    FPath = Left(fil, Len(fil) - Len(Split(fil, "\")(UBound(Split(fil, "\")))) - 1)
    'Get file information
    If Left$(fil, 1) = Left$(fldr, 1) Then
    If CBool(Len(Dir(fil))) Then
    z = z + 1
    ws.Cells(z + 1, 1).Resize(, 6) = _
    Array(Dir(fil), LocName, RowsOfData, Round((FileLen(fil) / 1000), 0), FileDateTime(fil), FPath)
    DoEvents
    With ws
    .Hyperlinks.Add .Range("A" & CStr(z + 1)), fil
    '.FoundFiles(i)
    End With
    End If
    End If
    'Workbooks.Close 'Fil
    Application.CutCopyMode = False 'Clear Clipboard
    Workbooks(Dir(fil)).Close SaveChanges:=False
    Next ii
    With ws
    Rw = .Cells.Rows.Count
    With .[A1:F1]
    .Value = [{"Full Name","Location","Rows of Data","Kilobytes","Last Modified", "Path"}]
    .Font.Underline = xlUnderlineStyleSingle
    .EntireColumn.AutoFit
    .HorizontalAlignment = xlCenter
    End With
    .[G1:IV1 ].EntireColumn.Hidden = True
    On Error Resume Next
    'Range(Cells(Rw, "A").End(3)(2), Cells(Rw, "A")).EntireRow.Hidden = True
    Range(.[A2 ], Cells(Rw, "C")).Sort [A2 ], xlAscending, Header:=xlNo
    End With
    End Sub
    Function ListFiles(ByVal Path As String, Optional ByVal NestedDirs As Boolean) _
    As String()
    Dim fso As New Scripting.FileSystemObject
    Dim fld As Scripting.folder
    Dim fileList As String
    ' get the starting folder
    Set fld = fso.GetFolder(Path)
    ' let the private subroutine do all the work
    fileList = ListFilesPriv(fld, NestedDirs)
    ' (the first element will be a null string unless the first ";" is removed)
    fileList = Right(fileList, Len(fileList) - 1)
    ' convert to a string array
    ListFiles = Split(fileList, ";")
    End Function
    ' private procedure that returns a file list
    ' as a comma-delimited list of files
    Function ListFilesPriv(ByVal fld As Scripting.folder, _
    ByVal NestedDirs As Boolean) As String
    Dim fil As Scripting.File
    Dim subfld As Scripting.folder
    ' list all the files in this directory
    For Each fil In fld.Files
    'If UCase(Left(Dir(fil), 5)) = "MULTI" And fil.Type = "Microsoft Excel Worksheet" Then
    If fil.Type = "Microsoft Excel Worksheet" Then
    ListFilesPriv = ListFilesPriv & ";" & fil.Path
    Debug.Print fil.Path
    End If
    Next
    ' if requested, search also subdirectories
    If NestedDirs Then
    For Each subfld In fld.SubFolders
    ListFilesPriv = ListFilesPriv & ListFilesPriv(subfld, NestedDirs)
    Next
    End If
    End Function
    Finally . . .
    Sub ListFiles()
        Dim folder As Variant
        Dim f As File
        Dim fs As New FileSystemObject
        Dim RowCtr As Integer
        Dim FPath As String
        Dim wb As Workbook
        RowCtr = 1
        FPath = "http://excel-pc:43231/Shared Documents"
        For Each f In FPath
        'Set folder = fs.GetFolder("C:\Users\Excel\Desktop\Ryan_Folder")
        'For Each f In folder.Files
           Cells(RowCtr, 1).Value = f.Name
           RowCtr = RowCtr + 1
        Next f
    End Sub
    Sub test()
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Set objFolder = objFSO.GetFolder("C:\Users\Excel\Desktop\Ryan_Folder")
        'Set colSubfolders = objFolder.SubFolders
        'For Each objSubfolder In colSubfolders
           Cells(RowCtr, 1).Value = f.Name
           RowCtr = RowCtr + 1
        'Next
    End Sub
    Ryan Shuell

  • Trying to connect Excel 2010 to Oracle

    Hello,
    I am trying to connect Excel 2010 directly to the Oracle database at work. I was hoping to combine VBA and SQL to automate queries without having to use SQL Developer or the bespoke enterprise software to then export the data into a spreadsheet. I have downloaded the ODBC driver and installed it onto my PC. I have tried to configure the connection and the tnsnames.ora file but it will not connect (I can get the exact error from work tomorrow).
    I have an XML file that contains all of the connection details (such as the ports, passwords and the server name) for the databases that I need to access. There isn’t anyone who can help me at work as the former IT manager has left and my current manager has very little technical knowledge.
    The network is managed by a different part of the business at an external site containing all of the servers. Although I have an administrator account, it is very restricted so I cannot use the command prompt but I can install software.
    I would be grateful for any advice. If it helps the operating system I am using is Windows Vista 32-Bit. I am unsure which version of Oracle we are using (it might be 10g but is there anything I could type into SQL Developer that would display the version of Oracle I am using?).
    Many thanks in advance and sorry for probably not explaining things very well,
    Matt

    I think I am going to give in with ODBC for the time being and I don’t want to waste any of your time.
    Just to make everything clear in case I missed something important out:
    I ran the select banner from v$version statement and retreived:
    Oracle Database 10g Release 10.2.0.5.0 - 64bit Production
    PL/SQL Release 10.2.0.5.0 - Production
    "CORE 10.2.0.5.0 Production"
    TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    I originally installed the latest version of 11g ODBC and reinstalled it as I didn't think it was working. I then installed 10g version today but I couldn't find ODBC.exe file like I could in the 11g version.
    I can't get the tnsnames.ora file off the database server as I can't connect to it. I know the server name but I think I may be restricted from accessing it as the network and user accounts are really locked down. I read somewhere when I was searching that there was a way of generating the tnsnames.ora file which would be quite useful as there wouldn't be any mistakes.
    Like I have mentioned before I can’t access the command prompt and the only way I can connect to the database is through SQL Developer (which I have all the connections for in an XML file).
    I tried the ADO method and it didn't work, but after getting home and trying something I know how to resolve the ActiveX Objects related error I was getting, so maybe I could get this method to work.
    It is just frustrating that I know this could work but things aren’t as simple as I thought although the advice I have received has been really useful. Thanks for all the help.

  • How to reserve the page size when exporting to MS Excel 2010

    Hello. I have a report which exports to MS Excel 2010. I applied the page size as legal in Crystal Report and would like to use the same page size in Excel
    However, MS Excel print preview says the page size is letter.
    How could I keep the same page size in Excel as I applied in Crystal Report. We have a lot of business reports and would like to avoid applying page setting manually in Excel when users print them out each time.
    Thank you.

    Hi Christine
    I am in the process of writing a doc on the different options in CR and the "No Printer" option sis one of those. Seeing this post, made me wonder as this looked like a questionable behavior. My testing does not support your observations. Now, I did a very simple test;
    Created a report, set "No Printer", set the paper size and legal orientation. Exported to XLS - any format, and the export maintained legal paper size in all instance. I did a few other variations, but I can never get the report to export anything other than Landscape.
    Can you  please let me know the version of CR you are using?
    You may also want to attach the report here with saved data (to attach rename the rpt to txt, then in the reply hit on the "Use advanced editor" link and attach.
    BTW.; I am using CR 2013.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • 32-bit...64-bit...Excel 2007...Excel 2010...nonetheless a .xlsx File

    My head is spinning...soooooo here's the deal...
    The client provides us a .xlsx File. Now I have no idea how this is created and saved...via Excel 2007...Excel 2010
    When I attempt sourcing the .xlsx File in my SSIS Package I get the error "External Table is not in the expected format"
    Sooooo, I figure I'd write a C# Edit Script to read .xlsx File and Save it as a .xls file using the following syntax...
    string StrFileName = (Dts.Variables["User::FileName"].Value.ToString());
    StrFileName = Path.GetFileNameWithoutExtension(StrFileName);
    string StringSourceFile = (Dts.Variables["User::FilePath"].Value.ToString()) + StrFileName + ".xlsx";
    string StringDestinationFile = (Dts.Variables["User::FilePath"].Value.ToString()) + StrFileName + ".xls";
    // This initiates the Excel Application
    Microsoft.Office.Interop.Excel.Application excelApplication = new Microsoft.Office.Interop.Excel.Application();
    // This Opens the Source .xlsx File from Emdeon ePaySmart
    Workbook workbook = excelApplication.Workbooks.Open(StringSourceFile, XlUpdateLinks.xlUpdateLinksNever, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
    // This will Save the Source .xlsx Emdeon ePaySmart File as a .xls File...note xlFileFormat.xlExcel5
    workbook.SaveAs(StringDestinationFile, XlFileFormat.xlExcel8, Type.Missing, Type.Missing, Type.Missing, Type.Missing, XlSaveAsAccessMode.xlExclusive, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
    // This will Close the Source
    workbook.Close(false, Type.Missing, Type.Missing);
    // This shuts down the Excel Application
    excelApplication.Quit();
    Note xlFileFormat.xlExcel8
    Now this worked PERFECTLY client side. Then when I created a SQL Server Agent Job it blew up and from what I read the SQL Server Agent Job does not like running dynamic Excel commands.
    Soooooooo now I'm back at the drawing board and figured I'd use OLE DB to source the file.
    I am using this Connection String for the .xlsx File
    string StringConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + sourceFile + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\"";
    Now I understand that the OLEDB.4.0 Connection string is incorrect for a .xlsx File. (Which is why I probably tried to do this with dynamic Excel commands to begin with)
    Now comes the chicken and the egg problem...
    If instead I try using the OLEDB.12.0 Connection String it tells me it isn't installed
    My network, copied Microsoft Office 2010 installed is 32-bit
    So if I try to install the 64-bit Microsoft Access Database Engine 2010 it tells me I have to Uninstall Microsoft Office 2010. Well that is not possible
    So my question is this...How in God's name can I try and process this .xlsx File??? I am at a complete loss here.
    I did come upon this Posting previously...in italics below but it fell short in terms of providing a solution.
    Can anyone please help me out here?
    Thanks in advance for your review and am hopeful for a reply.
    ITBobbyP85
    When I create my connection manager to connect to a .xlsx file, I get the error message that says:
    "Test connection failed because of an error in initializing provider. External table is not in the expected format."
    The provider selected was the ole db "Microsoft office 12.0 Access Database Engine...", and in the All tab I entered "Excel
    12.0" at the top where it says Extended properties.
    Here is the stumper:
    My import package(s) has (have) been running manually for the last 2-3 weeks, but now i've finished an automated system that downloads
    the files from the ftp site, unzips them, validates all the expected files are there, renames and relocates the files to the names/locations expected by my ETL, and then runs the ETL.
    I found out today that the people who manually did this process were each time opening the file and then saving it to the correct location
    in Excel 2007. 
    When I try to run my ETL on the files in the automated process, it fails with the above error. If, however, I just open the file and
    save it (also in 2007), it runs fine. I have been trying to figure out what saving the file is doing to change it to be in the expected format.
    I have tried to use an excel 2003 connection to connect to a copy of the file with a modified extension of .xls and that didn't work.
    (in case it was in another version of excel and someone just changed the ext)
    I then tried to access the file with the OLE DB provider, as above, but instead of entering 12.0 on the Extended properties line, entering
    9.0 or 14.0 in turn (creating new sources/connections each time), and when I do that, both times I get an error that says: 
    “Test connection failed because of an error in initializing provider. Could not find installable ISAM.”
    Am I missing something? Is there something else that simply opening and saving the file might be doing to make it paletable to ssis?
    If we install excel on the db server I realize i could probably open it up and save it as excel 2007 and that would do the trick, but
    the dba is resistant to this idea, so I thought I'd see if anyone has any other ideas?
    If we do have to install excel on that server, does the version have to be excel 2007 in order to programmatically save it as type 2007?
    thanks in advance for your thoughts on the issue...

    You just need to install the latest ACE OLEDB (JET) provider, then when you set the package to run use a proxy with proper rights to access the Excel file on the file system.
    http://www.microsoft.com/en-ca/download/details.aspx?id=13255
    Arthur
    MyBlog
    Twitter

  • Excel 2010 cannot complete this task... Error in a shared spreeadsheet

    The layout
    A server in an office connects 5 computers running windows 7 and using MS office plus 2010(32bit) and 1 computer running XP using MS office plus 2007(32bit), they are all 64bit OS's besides xp. They share many spreadsheets that are opened, edited and updated
    simultaneously off the server. Since the spreadsheets need to be referred to each other, 2 up to 5 excel files must be opened on the computer I'm working on.
    I'm working with a computer that has the following error during reading and writing to spreadsheets.
    "Excel cannot complete this task with available resources choose less data or close Other applications"
    This error occurs simply because excel has used up all the resources. However I'd like to avoid the simple "close redundant spreadsheets" because sooner or later they will need to be used.
    The problem is that its only one computer that is having this problem all other computers don't get this error despite having equal amount of spreadsheets opened as the problematic computer. We've upgraded the ram and graphics card on that computer yet problem
    persists. I'm aware of the 2gb ram access restriction office 32bit has.
    The only solution I can think of would be to install a 64 it version of office on this computer set the default program that opens the file to the 64bit excel version (only for the problematic computer). Will cause errors? Seeing as other computers run 32bit
    office?
    Does anyone know of any other ways of doing this? When the error occurs the file is locked and all data that is entered into the file after that is lost. Thanks in advanced

    Hi,
    Do these five pcs have the same hardware?
    As far as I know, the above memory error messages can be very generic and don't always identify the real cause of the issue. Please follow the KBs below, try the methods and check if they are helpful.
    http://support.microsoft.com/kb/2779852
    http://support.microsoft.com/kb/2655178
    Then, I agree with you, we can update the Excel to 64bit version. Because the max RAM usage of the Excel 2010 32bit version is 2 GB. Even if we add more physical memory, 32bit version won’t be able to use it.  I recommend you use Excel 64bit
    version to open/edit the large workbook instead. The 64-bit version of Excel 2010 is not constrained to 2 GB of RAM usage like 32-bit applications does.
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • DDE link between MT4 & Excel 2010 no longer works on Windows 8.1 64bit

    I have a DDE link between EXCEL 2010 & Metatrader (MT4)  that has worked flawlessly up until yesterday. Now the spreadsheet just hangs when
    i attempt to update.
    I had not changed anything on my machine prior to the problem, but have since repaired then reinstalled Office and reinstalled MT4 but the problem persists.
    The link still works fine on my Windows 7 64bit PC with the same version of Excel and MT4, so the problem is not at the server end. I have even taken the EXCEL file from the WIN8 machine and it works fine on the Win7 machine
    MT4 is installed in C:/ as the link did not work previously when installed in program files
    Help!

    P.S.  If Excel file was created on an older version of Excel, it should be converted to 2010 format, and the inputs are a little different.
    Example:
    Instead of  =MT4|ASK!EURUSD
    it's now       ='MT4'|ASK!EURUSD

Maybe you are looking for

  • Real-Time Decision Server is not running

    Hi, In the Admin guide for RTD Center, during Initializing the Oracle RTD Database Using SDDBTool, one of the step mentioned is "To check, Real-Time Decision Server is not running" but nothing has been mentioned if this is a Service or we have to che

  • Built in speakers not working, no red light, 2011 MacBook Pro 15''.

    I have been having audio issues with my computer ever since I upgraded to Mountian lion, internal speakers are not an option in sound settings. the volume indicator appears grey not black and sound is not adjustable. I am guessing Software issue beca

  • Magic Moves not always Magic (non-linear slide orders)

    Magic Moves opens the possibility of non-linear slide orders with animated transitions. Previously in keynote (KN '08), as far as I could ascertain, this was impossible. Now a slide with several hyper-linked objects can enjoy an animation of the on s

  • Hide Units

    Hi all, How to hide units in the report result display? in BI 7.0 queries. for Ex: im getting a value dispalyed as "4029.12 PC". I need to hide the Units "PC" in the report result. Please guide me in this issue. Thanks in Advance. Regards, Ravi

  • Rolling credits font

    Sorry for all the questions but its crunch time here and I have several DVD's that I have to finish for Christmas shows. On Rolling Credits.  What is the secret to the right font to use for that?  I had a very fancy Brush Script font that looks aweso