WN

WN (https://www.wn.se/forum/index.php)
-   Off Topic (https://www.wn.se/forum/forumdisplay.php?f=7)
-   -   Hitta dubletter i txt fil alt. Excel? (https://www.wn.se/forum/showthread.php?t=1053336)

audemars 2012-05-07 18:23

Hitta dubletter i txt fil alt. Excel?
 
Någon som kan tipsa om något program som kan hitta dubbletter i en lista av telefonnummer i Txt. alt Excelformat?

Sony? 2012-05-07 19:52

Finns massor om du googlar.

http://www.lytebyte.com/2008/06/10/h...es-excel-2007/

Googlade på "excel find dublicates".

audemars 2012-05-07 21:18

Citat:

Ursprungligen postat av Sony? (Inlägg 20439834)
Finns massor om du googlar.

http://www.lytebyte.com/2008/06/10/h...es-excel-2007/

Googlade på "excel find dublicates".

Söker efter ett externt program utanför Excel.

daniel_ 2012-05-07 21:40

Vill du bara hitta eller vill du ta bort dubletter?

audemars 2012-05-07 22:21

Citat:

Ursprungligen postat av daniel_ (Inlägg 20439842)
Vill du bara hitta eller vill du ta bort dubletter?

Både och. Skulle funka med att hitta dubbletter, så dom blir highlightade eller något.

daniel_ 2012-05-07 22:33

Vill du bara ta bort kan du göra det i de flesta text-editors. Testa t.ex. Textpad.

Alex 2012-05-08 18:17

Citat:

Ursprungligen postat av daniel_ (Inlägg 20439842)
Vill du bara hitta eller vill du ta bort dubletter?

PHP-kod:

echo implode("\n"array_unique(explode("\n"file_get_contents('textfil.txt')))); 

:D

dAEk 2012-05-09 20:48

Citat:

Ursprungligen postat av Alex (Inlägg 20439897)
PHP-kod:

echo implode("\n"array_unique(explode("\n"file_get_contents('textfil.txt')))); 


C#:
Kod:

var distinct = File.ReadAllLines("textfil.txt").Distinct();
var duplicates = File.ReadAllLines("textfil.txt").GroupBy(i => i).Where(i => i.Count() > 1).Select(i => i.First());

:)


Alla tider är GMT +2. Klockan är nu 11:20.

Programvara från: vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Svensk översättning av: Anders Pettersson