Protecting a csv file

Hey,
I have a csv file, which contains 20 Lines and 40 fields in each line.
I need to know if somebody has changed any values in the file.
I would imagine a simplistic approach would be to add up certain fields and then
append this total to the end of the file. Then check to see if the totals are equal.
Is the only other approach to hash the entire file using the Message Digest class?
This seems a bit overkill for what I need!
Any ideas would be greatly appreciated.
Thanks in advance

Is the only other approach to hash the entire file
using the Message Digest class?yepp! - Well, I don't know if that is the ONLY other approach, but I guess it's kind of an elegant way to test with a certain amount of confidence if the file has been changed or not.
This seems a bit overkill for what I need!Thats not overkill, in fact it's a quite light weighted solution. Checksums and digests are precisely made for what you are talking about here.
Stephan

Similar Messages

  • Cannot password protect CSV file

    I had a CSV file (workbook) that I password protected. Up until yesterday, I was prompted for a password to open this file, but this morning, I was not longer being prompted for a password. I tried opening the file in Excel 2013 and 2010 with the same result. 
    I tried to create a new CSV file (in both versions) and password protect the file (similarly to what I had done before) but the file did not retain the password protection.
    Has anyone had problems password protecting a CSV file? Is there somewhere documented that .CSV files do not support password protection.
    I am a little puzzled why it was working for several months, but now it is not.
    Thanks
    Andres

    Hi,
    I agree with Mr. Hans, we cannot password-protect it from Excel. I suppose that your CSV file may be encrypted with some code/third-party program. Please see the sample below:
    https://social.msdn.microsoft.com/Forums/en-US/e2e21aa2-0e48-4188-a63f-085fecb55b71/csv-file-encryptiondecryption
    Hope it's helpful.
    Regards,
    George Zhao
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click "[email protected]"

  • How can I import an existing csv. file into Outlook on a Mac with OS10.7

    Tried to import a csv. file on my Mac (OS 10.7.2) into Microsoft Outlook 2011 (for Mac) on the same computer, ended up with a useless Excel page - it opened the csv file in Excel with only a few contacts and uselessly formatted, at that!. Also, tried to save the csv file as a text file, then importing it into Word 2011 and Excel, with the same results. Anyone able to help? Would like to have the contained address/contact info look concise and neat, without duplicates or garbled/missing information.
    [email protected]

    DPS can use H.264 files, but I have no idea about the details since I've never done any of it myself. Ask in the ID/ DPS forums.
    Mylenium

  • How to get Document Set property values in a SharePoint library in to a CSV file using Powershell

    Hi,
    How to get Document Set property values in a SharePoint library into a CSV file using Powershell?
    Any help would be greatly appreciated.
    Thank you.
    AA.

    Hi,
    According to your description, my understanding is that you want to you want to get document set property value in a SharePoint library and then export into a CSV file using PowerShell.
    I suggest you can get the document sets properties like the PowerShell Command below:
    [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
    $siteurl="http://sp2013sps/sites/test"
    $listname="Documents"
    $mysite=new-object microsoft.sharepoint.spsite($siteurl)
    $myweb=$mysite.openweb()
    $list=$myweb.lists[$listname]
    foreach($item in $list.items)
    if($item.contenttype.name -eq "Document Set")
    if($item.folder.itemcount -eq 0)
    write-host $item.title
    Then you can use Export-Csv PowerShell Command to export to a CSV file.
    More information:
    Powershell for document sets
    How to export data to CSV in PowerShell?
    Using the Export-Csv Cmdlet
    Thanks
    Best Regards
    TechNet Community Support
    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]

  • BULK INSERT from a text (.csv) file - read only specific columns.

    I am using Microsoft SQL 2005, I need to do a BULK INSERT from a .csv I just downloaded from paypal.  I can't edit some of the columns that are given in the report.  I am trying to load specific columns from the file.
    bulk insert Orders
    FROM 'C:\Users\*******\Desktop\DownloadURL123.csv'
       WITH
                  FIELDTERMINATOR = ',',
                    FIRSTROW = 2,
                    ROWTERMINATOR = '\n'
    So where would I state what column names (from row #1 on the .csv file) would be used into what specific column in the table.
    I saw this on one of the sites which seemed to guide me towards the answer, but I failed.. here you go, it might help you:
    FORMATFILE [ = 'format_file_path' ]
    Specifies the full path of a format file. A format file describes the data file that contains stored responses created using the bcp utility on the same table or view. The format file should be used in cases in which:
    The data file contains greater or fewer columns than the table or view.
    The columns are in a different order.
    The column delimiters vary.
    There are other changes in the data format. Format files are usually created by using the bcp utility and modified with a text editor as needed. For more information, see bcp Utility.

    Date, Time, Time Zone, Name, Type, Status, Currency, Gross, Fee, Net, From Email Address, To Email Address, Transaction ID, Item Title, Item ID, Buyer ID, Item URL, Closing Date, Reference Txn ID, Receipt ID,
    "04/22/07", "12:00:21", "PDT", "Test", "Payment Received", "Cleared", "USD", "321", "2.32", "3213', "[email protected]", "[email protected]", "", "testing", "392302", "jdal32", "http://ddd.com", "04/22/03", "", "",
    "04/22/07", "12:00:21", "PDT", "Test", "Payment Received", "Cleared", "USD", "321", "2.32", "3213', "[email protected]", "[email protected]", "", "testing", "392932930302", "jejsl32", "http://ddd.com", "04/22/03", "", "",
    Do you need more than 2 rows? I did not include all the columns from the actual csv file but most of it, I am planning on taking to the first table these specfic columns: date, to email address, transaction ID, item title, item ID, buyer ID, item URL.
    The other table, I don't have any values from here because I did not list them, but if you do this for me I could probably figure the other table out.
    Thank you very much.

  • Power shell script to add multiple aliases with a .csv file.

    I have an email address lets say [email protected] and I need 1000 aliases added to the email. For example [email protected], [email protected] etc etc. and I have a .csv file with 990 columns with just project1, project2.
    Is there a way to run a command in powershell exchange to import all the aliases I need in a few commands? Can someone point me in the right direction if I am in the wrong forum also? Thanks
    No sure if this is correct or not:
    > $mbx = Get-Mailbox Project
    > Import-CSV "C:\SomePath\wherever.csv" | foreach { $mbx.EmailAddresses += $._SmtpAddress }
    > Set-Mailbox project -EmailAddresses $mbx.EmailAddresses

    Help Import-Csv -FULL
    $aliases=Import-Csv aliases.csv
    ¯\_(ツ)_/¯

  • How to use csv file to populate all the items in a form

    Our environment - Forms 6i/IAS 9i on Solaris/8.1.6 database on
    Solaris.
    In the web form I want the user to type in the name of an
    existing csv file(which contains 1 record). Then press a button
    and all the items on the form should be populated with the data
    in the csv file.
    One method is load the data in the csv file into the database
    using sqlloader and then execute a query to populate the form.
    Is there another way - instead of loading the file in the databas
    e? Thanks

    Hi Afroz,
    To be more specific, if the csv file doesn't has header, please refer to this script to add header:
    $csv = Import-Csv d:\haha.csv -Header "UserA","UserXYZ","EmailA"
    Then you can loop this csv file to run the "add-mailboxpermission" cmdlet, I recommend you can test this script before running against production environment, please also note I haven't tested this script:
    $csv = Import-Csv d:\users.csv -Header "UserA","UserXYZ","EmailA"
    foreach($each in $csv){
    write-host "assign fullaccess permission of user $($each.UserXYZ) on mailbox $($each.EmailA)"
    get-mailbox -identity $each.EmailA | add-mailboxpermission -user $each.UserXYZ -accessrights 'fullaccess'
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • I am try to download a CSV file and have it directly open in excel. It only opens in new page and not in excel. how do I get it to do that.

    In internet explorer I use to be able to click on a download link to have a csv file open in excel. I have never been able to open this download file before with Firefox. It turns out that I can no longer do it with Explorer either. I have sent this same question to them for help as I require this information. It is being downloaded from a secure site and is used for registration information.
    I need help as soon as possible.
    Thank you
    Rob

    See:
    *Firefox/Tools > Options > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
    The setting in "Tools > Options > Advanced > General" is meant as an accessibility feature, as you can see by the label of that section, so that people with disabilities or people who use screen readers do not get confused and is not meant as a safety protection to stop redirecting.
    See also:
    *https://support.mozilla.com/kb/Options+window+-+Advanced+panel#General_tab
    *http://kb.mozillazine.org/accessibility.blockautorefresh
    *http://kb.mozillazine.org/Accessibility_features_of_Firefox

  • How to create a passsword protection for EXCEL file

    Hi,
    I have created EXCEL, CSV and DBF file generation through Oracle PL/SQL. Now my client expecting to create a password protection. Can anyone tell me how to create a passsword protected file?
    Cheers,
    San

    How to protect an EXCEL file is not an Oracle issue and I don't think you can do this through PL/SQL. It's part of MS Office maintenance itself and it depends on the version:
    http://benosullivan.co.uk/windows/how-to-password-protect-excel-2010-workbooks/
    Werner

  • How to search text content of csv file

    I am, unfortunately, new to Macs and Mac OS X.  Please forgive my rudimentary terminology.  I use .csv files in my work, and I need to be able to search through a directory of them for all that contain a particular bit of text.  I have tried using the search box in Finder, and limiting my search to the particular folder containing the .csv files of interest.  I also have limited the search by selecting the options next to the search folder, and selecting the search criterion of "Contents" and typing the term I am seeking in the "contains" box.  This has not given me any results.  Is there another way to find what I am seeking?

    Hi Alfredo,
    Thanks for reply..Will you please explain in brief what are the  OCR program and workflow.
    Will you please send me any docs on [email protected]
    Thanks
    shiv.

  • JTable and large CSV files

    I have been looking for a clear answer (with source code) to a problem commonly asked in the forums. The question is "how do I display a large comma delimited (CSV) file in a JTable without encountering a Java heap space error?" One solution is described at http://forum.java.sun.com/thread.jspa?forumID=57&threadID=741313 but no source code is provided. Can anyone provide some example code as to how this solution works? It is not clear to me how the getValueAt(r, c) method can be used to get the (r+1)th row if only r rows are in the TableModel. I greatly appreciate any help.

    Perhaps if I posted my code, I might get a little help. First, my class that extends abstract table model
    public class DataTableModel extends AbstractTableModel{
         private static final long serialVersionUID = 1L;
         Object[][] data;
         DataColumnFormat[] colFormat;
         int nrows, ncols, totalRows;
         public DataTableModel(Object[][] aData, DataColumnFormat[] aColFormat, int aTotalNumberOfRows){
              data=aData;
              colFormat=aColFormat;
              nrows=data.length;
              ncols=data[0].length;
    //          number of rows in entire data file.
    //          This will be larger than nrows if data file has more than 1000 rows
              totalRows=aTotalNumberOfRows;
         public int getRowCount(){
              return nrows;
         public int getColumnCount(){
              return ncols;
         public String getColumnName(int aColumnIndex){
              return colFormat[aColumnIndex].getName();
         public Object getValueAt(int r, int c){
              if(colFormat[c].isDouble()){
                   return data[r][c];
              return data[r][c];
         public boolean isCellEditable(int nRow, int nCol){
              return true;
         @SuppressWarnings("unchecked")
         public Class getColumnClass(int c) {
            return getValueAt(0, c).getClass();
         protected void updateData(){
    //          replace values in data[][] object with new rows from large data file
    }Suppose data = new Object[1000][100] but my CSV file has 5000000000 lines (to exaggerate). By my understanding getValueAt(r, c) could not go beyond r=1000 and c=100. So, how would I update data with the next 1000 lines by way of the getValueAt(r,c) method? Moreover, how would I implement this so that the table appears to scroll continuously? I know someone has a solution to this problem. Thanks.

  • How to get DocSet property values in a SharePoint library into a CSV file using Powershell

    Hi,
    How to get DocSet property values in a SharePoint library into a CSV file using Powershell?
    Any help would be greatly appreciated.
    Thank you.
    AA.

    Hi AOK,
    Would you please post your current script and the issue for more effcient support.
    In addition, to manage document set in sharepoint please refer to this script to start:
    ### Load SharePoint SnapIn
    2.if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
    3.{
    4. Add-PSSnapin Microsoft.SharePoint.PowerShell
    5.}
    6.### Load SharePoint Object Model
    7.[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)
    8.
    9.### Get web and list
    10.$web = Get-SPWeb http://myweb
    11.$list = $web.Lists["List with Document Sets"]
    12.
    13.### Get Document Set Content Type from list
    14.$cType = $list.ContentTypes["Document Set Content Type Name"]
    15.
    16.### Create Document Set Properties Hashtable
    17.[Hashtable]$docsetProperties = @{"DocumentSetDescription"="A Document Set"}
    18.$docsetProperties = @{"CustomColumn1"="Value 1"}
    19.$docsetProperties = @{"CustomColum2"="Value2"}
    20. ### Add all your Columns for your Document Set
    21.
    22.### Create new Document Set
    23.$newDocumentSet = [Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet]::Create($list.RootFolder,"Document Set Title",$cType.Id,$docsetProperties)
    24.$web.Dispose()
    http://www.letssharepoint.com/2011/06/document-sets-und-powershell.html
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • CLR to get the SQL Server Data into .CSV File

    Hi,
    I transformed 10 columns 1000 rows from the source table to 1 column 1000 rows in the destination table by making the comma separated columns ( Just like ..
    Insert into DestinationTable
    SELECT col1+','+col2 ....
    FROM SourceTable
    Then I want to take this column into CSV file.
    I dont have the rights to command shell.
    I heard that we may use CLR procedure for this. Can someone throw light?

    using System;
    using System.IOM
    using System.Data;
    using System.Data.SqlClient;
    using System.Data.SqlTypes;
    using Microsoft.SqlServer.Server;
    public class ExportFileClass {
    [Microsoft.SqlServer.Server.SqlProcedure]
    public static void export_file()
    using (SqlConnection connection = new SqlConnection(
    "context connection=true"))
    connection.Open();
    // Operation to open file goes here.
    SqlCommand command = new SqlCommand("SELECT col FROM YourTable");
    // Consume result set and write rows.
    Build this from the command line:
    sn -k keypair.snk
    csc /target:library /keyfile:keypair.snk exportfile.cs
    Then run in SQL Server (assuming that the files are in C:\temp on the SQL
    Server machine:
    [sql]
    USE master
    go
    -- To be able to create an external-access assembly, we need to load
    -- the key, the assembly is signed with. The key needs a password, but we
    -- don't need to know the password.
    DECLARE @sql nvarchar(MAX),
            @password char(40)
    SELECT @password = convert(char(36), newid()) + 'Ab4?'
    SELECT @sql = 'CREATE ASYMMETRIC KEY slog_loopback FROM FILE = ' +
                  '''C:\temp\keypair.snk'' ' +
                  'ENCRYPTION BY PASSWORD = ''' + @password + ''''
    PRINT @sql
    EXEC(@sql)
    -- And then a login to carry the permission.
    CREATE LOGIN exportfile$asymkey FROM ASYMMETRIC KEY ExportFile
    GRANT EXTERNAL ACCESS ASSEMBLY TO exportfile$asymkey
    go
    -- Now we can go back to our regular database and create the assembly.
    USE youddatabase
    go
    CREATE ASSEMBLY ExportFile FROM 'C:\temp\exportfile.dll'
    WITH PERMISSION_SET = EXTERNAL_ACCESS
    go
    CREATE PROCEDURE ExportFile AS
    EXTERNAL NAME ExportFile.ExportFileClass.export_file
    [sql]
    It is likely that you will have to do ask your DBA to do things in the
    master database.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Problem in handling complex CSV file

    Hi,
    I am facing a strange problem in handling a complex CSV file.
    The content of the file is as follows. It is getting executed through an XSD and the target is a table.
    First time when the interface is executed ( for e.g session id - 19001) it is getting completed successfully.
    Now when making changes in the CSV file suppose adding ( for e.g.-
    DEPT,D05,Books,ABC Store
    CUST,C01,Sayantan,[email protected]
    CUST,C02,Shubham,[email protected])
    or deleting ( for e.g.-
    CUST,C02,Sarbajit,[email protected])
    and running the interface I am not getting the added D05 in the target table nor my C02 data is getting removed i.e.- the updated data in CSV file is not getting fetched and I am getting the same records as i got when i ran interface of session id 19001.
    I am not getting why it is happening??
    The CSV file used in session id -19001 is:
    DEPT,D01,Retail,World Mart
    CUST,C01,Anindya,[email protected]
    CUST,C02,Rashni,[email protected]
    DEPT,D02,Food,Food Bazar
    CUST,C01,Abhijit,[email protected]
    CUST,C02,Anirban,[email protected]
    CUST,C03,Sharmistha,[email protected]
    DEPT,D03,Water,SW
    CUST,C01,Nirmalya,[email protected]
    DEPT,D04,Clothes,City style
    CUST,C02,Sarbajit,[email protected]
    CUST,C03,Abhishek,[email protected]

    Here's what you can do to handle CSV files using HSQL.
    Say the CSV file contains order data. Each order record contains data about a particular order like order number, product code, quantity, ordered by, date etc. Now lets take a hypothetical requirement which says, the user needs to know how many orders were ordered per product.
    Option 1]  At the basic level, read the order file, parse each line and write the logic to get count of orders per product.
    Option 2] Load this CSV file into a database like MySQL and write database queries to get the orders per product.
    So where does this leave us? Have we run out of options? I am sure we would have tried & used the above two options . But I wanted a different approach. Following questions were lingering in my mind:
    1] Why can’t I write SQL queries against the CSV file itself. After all it’s like any RDBMS table.
    2] Why should I load the CSV file into some database before I query it?
    3] Why can’t I create a database table & attach the CSV file to it?
    Continue Reading Here: Handling CSV Files

  • Importing a .csv file into numbers

    thanks in advance for any help you can provide.
    i am a spreadsheet newbie. i am attempting to open a .csv file in numbers. this file when opened on the internet does have each filed seperated by commas, not tabs. when i drag it into numbers, it opens each line in its own row, however it puts the entire information (lets say 5 commas worth) in one column.
    so what i am getting is everything in a numbered row but the program does not appear to be recognizing the commas as a reason to put the information in its own column.
    this is not a life threatening endeavor, i am just trying to organize my guitar magazine collection. i would like to find the song by doing a search of columns/rows and i do not think i can do it as is.
    thanks again...
    Message was edited by: pensncrows

    60wpm wrote:
    I've tried putting in: ¶ - then for MS Word I heard you could put in ^p and/or \n --- but they didn't work.
    !? -- So what do I put in the Replace Text Field box?
    To type a return into the Find/Replace dialogue, Pages uses option-return, Text Wrangler uses command-return (or type \r), haven't checked Text Edit.
    If you Show Invisibles (View menu in Pages, Edit menu > Text Options in Text Wrangler, text Edit doesn't appear to have the option of viewing the invisible characters), you can copy a return, and paste it into the box in pretty much any application that will display the invisible characters. Actually, you should be able to copy the return character even without being able to see it—select from just after the last visible character in a 'paragraph' to the very beginning of the next line, Copy—but it is nice to be able to see what you're doing.
    (I have Pages, MacJournal, Bean, & Text Wrangler and a few other word processing program)
    One note on Pages: Pages does not offer the option to Save as..Text. For that, you have to go File > Export... and choose Plain Text.
    To restate the problem (and I appreciate your help)
    I have a new mailing list with about 100 emails that are separated by commas. The program I'm using seems to require each email be on a separate line. So instead of:
    [email protected], [email protected]
    I want:
    [email protected],
    [email protected]
    So I just want to do a find and replace on "," and replace it with ", carriage return".
    It would be SO GREAT to finally overcome this hurdle.
    Any of the three options above should do the job.
    Regards,
    Barry

Maybe you are looking for